Classes implementing Document Object Model Level 2 Style Sheets http://www.w3.org/TR/2000/PR-DOM-Level-2-Style-20000927/stylesheets.html
The StyleSheet interface is the abstract base interface for any type of style sheet. It represents a single style sheet associated with a structured document.
In HTML, the StyleSheet interface represents either an external style sheet, included via the HTML LINK element, or an inline STYLE element (also an @import stylesheet?).
In XML, this interface represents an external style sheet, included via a style sheet processing instruction.
Not used in cssutils yet.
If the style sheet is a linked style sheet, the value of this attribute is its location. For inline style sheets, the value of this attribute is None. See the href attribute definition for the LINK element in HTML 4.0, and the href pseudo-attribute for the XML style sheet processing instruction.
Not used in cssutils yet.
For style sheet languages that support the concept of style sheet inclusion, this attribute represents the including style sheet, if one exists. If the style sheet is a top-level style sheet, or the style sheet language does not support inclusion, the value of this attribute is None.
Internal readonly attribute, DO NOT USE!
This specifies the style sheet language for this style sheet. The style sheet language is specified as a content type (e.g. text/css). The content type is often specified in the ownerNode. Also see the type attribute definition for the LINK element in HTML 4.0, and the type pseudo-attribute for the XML style sheet processing instruction. For CSS this is always text/css.
Interface StyleSheetList (introduced in DOM Level 2)
The StyleSheetList interface provides the abstraction of an ordered collection of StyleSheet objects.
The items in the StyleSheetList are accessible via an integral index, starting from 0.
This Python implementation is based on a standard Python list so e.g. allows examplelist[index] usage.
Used to retrieve a style sheet by ordinal index. If index is greater than or equal to the number of style sheets in the list, this returns None.
The number of StyleSheet objects in the list. The range of valid child stylesheet indices is 0 to length-1 inclusive.
A Media Query consists of one of MediaQuery.MEDIA_TYPES and one or more expressions involving media features.
Format:
media_query
: [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
| expression [ AND S* expression ]*
;
media_type
: IDENT
;
expression
: '(' S* media_feature S* [ ':' S* expr ]? ')' S*
;
media_feature
: IDENT
;
The parsable textual representation of the media list.
The media type of this MediaQuery (one of MEDIA_TYPES) but only if it is a simple MediaType!
Internal readonly attribute, DO NOT USE!
Provides the abstraction of an ordered collection of media, without defining or constraining how this collection is implemented.
A single media in the list is an instance of MediaQuery. An empty list is the same as a list that contains the medium “all”.
New format with MediaQuery:
: S* [media_query [ ',' S* media_query ]* ]?
Same as appendMedium().
Add the newMedium to the end of the list. If the newMedium is already used, it is first removed.
Parameters: | newMedium – a string or a MediaQuery |
---|---|
Returns: | Wellformedness of newMedium. |
Exceptions : |
|
Delete a medium from the list.
Parameters: | oldMedium – delete this medium from the list. |
---|---|
Exceptions : |
|
Return the mediaType of the index‘th element in the list. If index is greater than or equal to the number of media in the list, returns None.
The number of media in the list (DOM readonly).
The parsable textual representation of the media list.
The CSSRule (e.g. an @media or @import rule this list is part of or None
Internal readonly attribute, DO NOT USE!