Package cssutils :: Package css :: Module cssfontfacerule :: Class CSSFontFaceRule
[hide private]
[frames] | no frames]

Class CSSFontFaceRule

source code

object --+            
         |            
 util.Base --+        
             |        
    util.Base2 --+    
                 |    
   cssrule.CSSRule --+
                     |
                    CSSFontFaceRule

The CSSFontFaceRule interface represents a @font-face rule in a CSS style sheet. The @font-face rule is used to hold a set of font descriptions.

Properties

atkeyword (cssutils only)
the literal keyword used
cssText: of type DOMString
The parsable textual representation of this rule
style: of type CSSStyleDeclaration
The declaration-block of this rule.

Inherits properties from CSSRule

Format

font_face
  : FONT_FACE_SYM S*
    '{' S* declaration [ ';' S* declaration ]* '}' S*
  ;
Nested Classes [hide private]

Inherited from util.Base (private): _prods

Instance Methods [hide private]
 
__init__(self, style=None, parentRule=None, parentStyleSheet=None, readonly=False)
if readonly allows setting of properties in constructor only
source code
 
_getCssText(self)
returns serialized property cssText
source code
 
_setCssText(self, cssText)
DOMException on setting
source code
 
_getStyle(self) source code
 
_setStyle(self, style)
StyleDeclaration or string
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code

Inherited from cssrule.CSSRule (private): _setAtkeyword

Inherited from util.Base2 (private): _adddefaultproductions, _setSeq, _tempSeq

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Static Methods [hide private]

Inherited from util.Base (private): _normalize

Class Variables [hide private]
  wellformed = True
READONLY

Inherited from cssrule.CSSRule: CHARSET_RULE, COMMENT, FONT_FACE_RULE, IMPORT_RULE, MEDIA_RULE, NAMESPACE_RULE, PAGE_RULE, STYLE_RULE, UNKNOWN_RULE

Inherited from cssrule.CSSRule (private): _typestrings

Inherited from util.Base (private): _SHORTHANDPROPERTIES, _log

Properties [hide private]
  type
The type of this rule, as defined by a CSSRule type constant.
  cssText
(DOM) The parsable textual representation of the rule.
  style
(DOM) The declaration-block of this rule set.

Inherited from cssrule.CSSRule: atkeyword, parentRule, parentStyleSheet, typeString

Inherited from util.Base2: seq

Inherited from object: __class__

Method Details [hide private]

__init__(self, style=None, parentRule=None, parentStyleSheet=None, readonly=False)
(Constructor)

source code 

if readonly allows setting of properties in constructor only

style
CSSStyleDeclaration for this CSSStyleRule
Overrides: object.__init__

_setCssText(self, cssText)

source code 

DOMException on setting

  • SYNTAX_ERR: (self, StyleDeclaration) Raised if the specified CSS string value has a syntax error and is unparsable.
  • INVALID_MODIFICATION_ERR: (self) Raised if the specified CSS string value represents a different type of rule than the current one.
  • HIERARCHY_REQUEST_ERR: (CSSStylesheet) Raised if the rule cannot be inserted at this point in the style sheet.
  • NO_MODIFICATION_ALLOWED_ERR: (CSSRule) Raised if the rule is readonly.
Overrides: cssrule.CSSRule._setCssText

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details [hide private]

type

The type of this rule, as defined by a CSSRule type constant. Overwritten in derived classes.

The expectation is that binding-specific casting methods can be used to cast down from an instance of the CSSRule interface to the specific derived interface implied by the type. (Casting not for this Python implementation I guess...)

Get Method:
unreachable(self)

cssText

(DOM) The parsable textual representation of the rule.
Get Method:
_getCssText(self) - returns serialized property cssText
Set Method:
_setCssText(self, cssText) - DOMException on setting

style

(DOM) The declaration-block of this rule set.
Get Method:
_getStyle(self)
Set Method:
_setStyle(self, style) - StyleDeclaration or string