__repr__ for font-face rule

This commit is contained in:
Kovid Goyal 2014-06-07 20:57:11 +05:30
parent 70ec3dba42
commit 8ec267ae38

View file

@ -7,7 +7,7 @@
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
from .css21 import CSS21Parser, ParseError
from tinycss.css21 import CSS21Parser, ParseError
class FontFaceRule(object):
@ -18,6 +18,10 @@ def __init__(self, declarations, line, column):
self.line = line
self.column = column
def __repr__(self):
return ('<{0.__class__.__name__} at {0.line}:{0.column}>'
.format(self))
class CSSFonts3Parser(CSS21Parser):
''' Parse @font-face rules from the CSS 3 fonts module '''