| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
util.Base --+
|
util.Base2 --+
|
Selector
(cssutils) a single selector in a SelectorList of a CSSStyleRule
tuple of (a, b, c, d) where:
# implemented in SelectorList
selectors_group
: selector [ COMMA S* selector ]*
;
selector
: simple_selector_sequence [ combinator simple_selector_sequence ]*
;
combinator
/* combinators can be surrounded by white space */
: PLUS S* | GREATER S* | TILDE S* | S+
;
simple_selector_sequence
: [ type_selector | universal ]
[ HASH | class | attrib | pseudo | negation ]*
| [ HASH | class | attrib | pseudo | negation ]+
;
type_selector
: [ namespace_prefix ]? element_name
;
namespace_prefix
: [ IDENT | '*' ]? '|'
;
element_name
: IDENT
;
universal
: [ namespace_prefix ]? '*'
;
class
: '.' IDENT
;
attrib
: '[' S* [ namespace_prefix ]? IDENT S*
[ [ PREFIXMATCH |
SUFFIXMATCH |
SUBSTRINGMATCH |
'=' |
INCLUDES |
DASHMATCH ] S* [ IDENT | STRING ] S*
]? ']'
;
pseudo
/* '::' starts a pseudo-element, ':' a pseudo-class */
/* Exceptions: :first-line, :first-letter, :before and :after. */
/* Note that pseudo-elements are restricted to one per selector and */
/* occur only in the last simple_selector_sequence. */
: ':' ':'? [ IDENT | functional_pseudo ]
;
functional_pseudo
: FUNCTION S* expression ')'
;
expression
/* In CSS3, the expressions are identifiers, strings, */
/* or of the form "an+b" */
: [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
;
negation
: NOT S* negation_arg S* ')'
;
negation_arg
: type_selector | universal | HASH | class | attrib | pseudo
;
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
_namespaces if this Selector is attached to a CSSStyleSheet the namespaces of that sheet are mirrored here. |
|||
|
element Effective element target of this selector. |
|||
|
parentList (DOM) The SelectorList that contains this Selector or None if this Selector is not attached to a SelectorList. |
|||
|
selectorText (DOM) The parsable textual representation of the selector. |
|||
|
specificity Specificity of this selector (READONLY). |
|||
| wellformed | |||
|
Inherited from Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
|
repr(x)
|
str(x)
|
|
|||
_namespacesif this Selector is attached to a CSSStyleSheet the namespaces of that sheet are mirrored here. While the Selector (or parent SelectorList or parentRule(s) of that are not attached a own dict of {prefix: namespaceURI} is used.
|
elementEffective element target of this selector.
|
parentList(DOM) The SelectorList that contains this Selector or None if this Selector is not attached to a SelectorList.
|
selectorText(DOM) The parsable textual representation of the selector.
|
specificitySpecificity of this selector (READONLY).
|
wellformed
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Jul 30 13:52:06 2008 | http://epydoc.sourceforge.net |