Home | Trees | Indices | Help |
|
---|
|
CSSStyleDeclaration implements DOM Level 2 CSS CSSStyleDeclaration and extends CSS2Properties
User agents must ignore a declaration with an unknown property. For example, if the style sheet is:
H1 { color: red; rotation: 70minutes }
the user agent will treat this as if the style sheet had been:
H1 { color: red }
Cssutils gives a message about any unknown properties but keeps any property (if syntactically correct).
User agents must ignore a declaration with an illegal value. For example:
IMG { float: left } /* correct CSS2 */ IMG { float: left here } /* "here" is not a value of 'float' */ IMG { background: "red" } /* keywords cannot be quoted in CSS2 */ IMG { border-width: 3 } /* a unit must be specified for length values */
A CSS2 parser would honor the first rule and ignore the rest, as if the style sheet had been:
IMG { float: left } IMG { } IMG { } IMG { }
Cssutils again will issue a message (WARNING in this case) about invalid CSS2 property values.
This interface is also used to provide a read-only access to the computed values of an element. See also the ViewCSS interface.
Version: $Id: cssstyledeclaration.py 1284 2008-06-05 16:29:17Z cthedot $
|
|||
Property (cssutils) a CSS property in a StyleDeclaration of a CSSStyleRule |
|||
CSSStyleDeclaration The CSSStyleDeclaration class represents a single CSS declaration block. |
Imports: xml, cssutils, CSS2Properties
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 11 21:02:55 2008 | http://epydoc.sourceforge.net |