SharpVectors.Css
The CSSCharsetRule interface represents a @charset rule in a CSS style sheet. The value of the
encoding attribute does not affect the encoding of text data in the DOM objects; this encoding is
always UTF-16. After a stylesheet is loaded, the value of the encoding attribute is the value found
in the @charset rule. If there was no @charset in the original document, then no CSSCharsetRule is
created. The value of the encoding attribute may also be used as a hint for the encoding used on
serialization of the style sheet.
The value of the @charset rule (and therefore of the CSSCharsetRule) may not correspond to the
encoding the document actually came in; character encoding information e.g. in an HTTP header, has
priority (see CSS document representation) but this is not reflected in the CSSCharsetRule.
The constructor for CssCharSetRule
The Regex match that found the charset rule
The parent rule or parent stylesheet
True if this instance is readonly
An array of strings that have been replaced in the string
used for matching. These needs to be put back use the DereplaceStrings method
The type of CssStyleSheet
The encoding information used in this @charset rule
The type of the rule. 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.
Used internally to store collected properties.
The name of the property
The calculated specificity
The origin of the collected property.
The value of the property
The priority of the property, e.g. "important"
Used internally for collection of styles for a specific element
Returns the origin type of the collected property
The name of the property
The origin type
Used to retrieve the priority of a CSS property (e.g. the "important" qualifier) if the property has been explicitly set in this declaration block.
The name of the CSS property. See the CSS property index.
A string representing the priority (e.g. "important") if one exists. The empty string if none exists.
Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block.
The name of the CSS property. See the CSS property index.
Returns the value of the property if it has been explicitly set for this declaration block. Returns the empty string if the property has not been set.
The number of properties that have been explicitly set in this declaration block. The range of valid indices is 0 to length-1 inclusive.
The parsable textual representation of the declaration block (excluding the surrounding curly braces). Setting this attribute will result in the parsing of the new value and resetting of all the properties in the declaration block including the removal or addition of properties.
SYNTAX_ERR: Raised if the specified CSS string value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or a property is readonly.
Used to retrieve the properties that have been explicitly set in this declaration block. The order of the properties retrieved using this method does not have to be the order in which they were set. This method can be used to iterate over all properties in this declaration block.
The name of the property at this ordinal position. The empty string if no property exists at this position.
The RGB-Color interface is used to represent any RGB color value.
This interface reflects the values in the underlying style property. Hence, modifications made to the
CSSPrimitiveValue objects modify the style property. A specified RGB color is not clipped
(even if the number is outside the range 0-255 or 0%-100%).
A computed RGB color is clipped depending on the device.
Even if a style sheet can only contain an integer for a color value, the internal storage of this
integer is a float, and this can be used as a float in the specified or the computed style.
A color percentage value can always be converted to a number and vice versa.
Constructs a RgbColor based on the GDI color
Constructs a RgbColor based on the GDI color
Parses a constructs a RgbColor
String to parse to find the color
Gets a value which indicates whether the color is defined by custom properties.
This attribute is used for the red value of the RGB color
This attribute is used for the green value of the RGB color.
This attribute is used for the blue value of the RGB color
Converts HSL color (values from 0 to 1) to RGB color.
Based on codes from: https://geekymonkey.com/Programming/CSharp/RGB2HSL_HSL2RGB.htm
hue
saturation
lightness
alpha
The interface represents a @font-face rule in a CSS style sheet.
The @font-face rule is used to hold a set of font descriptions.
The constructor for CssFontFaceRule
The parent rule or parent stylesheet
True if this instance is readonly
An array of strings that have been replaced in the string
used for matching. These needs to be put back use the DereplaceStrings method
The type of CssStyleSheet
The declaration-block of this rule.
The type of the rule. 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.
The parsable textual representation of the rule. This reflects the current state of the
rule and not its initial value.
Parses a string containging CSS and creates a CssFontFaceRule instance if found as the first content
The CSSImportRule interface represents a @import rule within a CSS style sheet.
The @import rule is used to import style rules from other style sheets.
The constructor for CssImportRule
The Regex match that found the charset rule
The parent rule or parent stylesheet
True if this instance is readonly
An array of strings that have been replaced in the string used
for matching. These needs to be put back use the DereplaceStrings method
The type of CssStyleSheet
The constructor for CssImportRule
The Regex match that found the charset rule
The parent rule or parent stylesheet
True if this instance is readonly
An array of strings that have been replaced in the string used
for matching. These needs to be put back use the DereplaceStrings method
The type of CssStyleSheet
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
The style sheet referred to by this rule, if it has been loaded. The value of this attribute is
null if the style sheet has not yet been loaded or if it will not be loaded (e.g. if the style
sheet is for a media type not supported by the user agent).
A list of media types for which this style sheet may be used.
The location of the style sheet to be imported. The attribute will not contain the "url(...)"
specifier around the URI
The type of the rule. 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.
The CSSMediaRule interface represents a @media rule in a CSS style sheet. A @media rule can be
used to delimit style rules for specific media types.
The constructor for CssMediaRule
The Regex match that found the charset rule
The parent rule or parent stylesheet
True if this instance is readonly
An array of strings that have been replaced in the string used
for matching. These needs to be put back use the DereplaceStrings method
The type of CssStyleSheet
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
Used to delete a rule from the media block.
The index within the media block's rule collection of the rule to remove.
INDEX_SIZE_ERR: Raised if the specified index does not correspond to a rule in the media rule list.
NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is readonly.
Used to insert a new rule into the media block
The parsable text representing the rule. For rule sets this contains both the
selector and the style declaration. For at-rules, this specifies both the at-identifier and the
rule content.
The index within the media block's rule collection of the rule before which
to insert the specified rule. If the specified index is equal to the length of the media blocks's
rule collection, the rule will be added to the end of the media block.
The index within the media block's rule collection of the newly inserted rule.
HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the
specified index, e.g., if an @import rule is inserted after a standard rule set or other at-rule.
INDEX_SIZE_ERR: Raised if the specified index is not a valid insertion point.
NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is readonly
SYNTAX_ERR: Raised if the specified rule has a syntax error and is unparsable
A list of all CSS rules contained within the media block.
A list of media types for this rule
The type of the rule. 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.
The CSSPageRule interface represents a @page rule within a CSS style sheet. The @page rule is
used to specify the dimensions, orientation, margins, etc. of a page box for paged media.
The constructor for CssPageRule
The Regex match that found the charset rule
The parent rule or parent stylesheet
True if this instance is readonly
An array of strings that have been replaced in the string used for matching. These needs to be put back use the DereplaceStrings method
The type of CssStyleSheet
The parsable textual representation of the page selector for the rule.
SYNTAX_ERR: Raised if the specified CSS string value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.
The declaration-block of this rule.
The type of the rule. 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.
This implements the interface which represents a single CSS value.
This interface may be used to determine the value of a specific style property currently set in a block
or to set a specific style property explicitly within the block. An instance of this interface might be
obtained from the getPropertyCSSValue method of the CSSStyleDeclaration interface. A CSSPrimitiveValue
object only occurs in a context of a CSS property.
Conversions are allowed between absolute values (from millimeters to centimeters,
from degrees to radians, and so on) but not between relative values. (For example,
a pixel value cannot be converted to a centimeter value.) Percentage values can't
be converted since they are relative to the parent value (or another property value).
There is one exception for color percentage values: since a color percentage value
is relative to the range 0-255, a color percentage value can be converted to a number;
(see also the RGBColor interface).
Constructor called by CssValue.GetCssValue()
A Regex that matches a CssPrimitiveValue
Specifiec if this instance is read-only
Only for internal use
A method to set the float value with a specified unit. If the property attached with this
value can not accept the specified unit or the float value, the value will be unchanged
and a will be raised.
A unit code as defined above. The unit code can only be a float
unit type (i.e. CSS_NUMBER, CSS_PERCENTAGE, CSS_EMS, CSS_EXS, CSS_PX, CSS_CM, CSS_MM, CSS_IN,
CSS_PT, CSS_PC, CSS_DEG, CSS_RAD, CSS_GRAD, CSS_MS, CSS_S, CSS_HZ, CSS_KHZ, CSS_DIMENSION).
The new float value.
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float value.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
This method is used to get a float value in a specified unit. If this CSS value doesn't
contain a float value or can't be converted into the specified unit, a is raised
A unit code to get the float value. The unit code can only be a
float unit type (i.e. CSS_NUMBER, CSS_PERCENTAGE, CSS_EMS, CSS_EXS, CSS_PX, CSS_CM, CSS_MM,
CSS_IN, CSS_PT, CSS_PC, CSS_DEG, CSS_RAD, CSS_GRAD, CSS_MS, CSS_S, CSS_HZ, CSS_KHZ, CSS_DIMENSION).
The float value in the specified unit.
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float value.
A method to set the string value with the specified unit. If the property attached to this
value can't accept the specified unit or the string value, the value will be unchanged and
a will be raised.
A string code as defined above. The string code can only
be a string unit type (i.e. CSS_STRING, CSS_URI, CSS_IDENT, and CSS_ATTR).
The new string value
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string value.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
This method is used to get the string value. If the CSS value doesn't contain a
string value, a is raised.
Note: Some properties (like 'font-family' or 'voice-family') convert a whitespace
separated list of idents to a string.
The string value in the current unit. The current primitiveType can only
be a string unit type (i.e. CSS_STRING, CSS_URI, CSS_IDENT and CSS_ATTR).
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string value.
This method is used to get the Counter value. If this CSS value doesn't contain a counter value,
a is raised. Modification to the corresponding style property can be achieved
using the Counter interface
The Counter value.
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Counter value (e.g. this is not CSS_COUNTER).
This method is used to get the Rect value. If this CSS value doesn't contain a rect value,
a is raised. Modification to the corresponding style property can be achieved
using the Rect interface.
The Rect value.
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a rect value.
This method is used to get the RGB color. If this CSS value doesn't contain a RGB color value,
a is raised. Modification to the corresponding style property can be achieved
using the RGBColor interface.
the RGB color value.
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a rgb value.
The type of the value as defined by the constants specified above.
The Rect interface is used to represent any rect value. This interface reflects the values in
the underlying style property. Hence, modifications made to the CSSPrimitiveValue objects modify
the style property.
Constructs a new Rect
The string to parse that contains the Rect structure
Specifies if the Rect should be read-only
This attribute is used for the left of the rect.
This attribute is used for the bottom of the rect.
This attribute is used for the right of the rect.
This attribute is used for the top of the rect.
The origin stylesheet type of this rule
Specifies the read/write state of the instance
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
Finds the owner node of this rule
The owner XmlNode
The style sheet that contains this rule
If this rule is contained inside another rule (e.g. a style rule inside an @media block),
this is the containing rule. If this rule is not nested inside any other rules,
this returns null
The type of the rule, as defined above. 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.
The parsable textual representation of the rule. This reflects the current state of the
rule and not its initial value.
The CSSRuleList interface provides the abstraction of an ordered collection of CSS rules.
The items in the CSSRuleList are accessible via an integral index, starting from 0.
Constructor for CssRuleList
The parent rule or parent stylesheet
The CSS text containing the rules that will be in this list
An array of strings that have been replaced in the string used for matching.
These needs to be put back use the DereplaceStrings method.
The type of CssStyleSheet
Constructor for CssRuleList
The parent rule or parent stylesheet
The CSS text containing the rules that will be in this list
True if this instance is readonly
An array of strings that have been replaced in the string used for matching.
These needs to be put back use the DereplaceStrings method.
The type of CssStyleSheet
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
Deletes a rule from the list
The index of the rule to delete
NO_MODIFICATION_ALLOWED_ERR
INDEX_SIZE_ERR
The number of CSSRules in the list. The range of valid child rule indices is 0 to length-1 inclusive.
Used to retrieve a CSS rule by ordinal index. The order in this collection represents
the order of the rules in the CSS style sheet. If index is greater than or equal to
the number of rules in the list, this returns null.
Internal class that stores a style in a declaration block
The type of the owner stylesheet
The property name
The value of the style
The priority of the style, e.g. "important"
The calculated specificity of the owner selector
The interface represents a single CSS declaration block.
This interface may be used to determine the style properties currently set in a block or
to set style properties explicitly within the block.
While an implementation may not recognize all CSS properties within a CSS declaration block,
it is expected to provide access to all specified properties in the style sheet through the
interface. Furthermore, implementations that support a
specific level of CSS should correctly handle CSS shorthand properties for that level.
For a further discussion of shorthand properties, see the CSS2Properties interface.
This interface is also used to provide a read-only access to the computed values of an element.
See also the ViewCSS interface.
Note: The CSS Object Model doesn't provide an access to the specified or actual values of the CSS cascade
The constructor used internally when collecting styles for a specified element
The constructor for CssStyleDeclaration
The string to parse for CSS
The parent rule or parent stylesheet
True if this instance is readonly
The type of CssStyleSheet
Used to find matching style rules in the cascading order
Parsing CSS in C#: extracting all URLs
https://stackoverflow.com/questions/18262390/parsing-css-in-c-extracting-all-urls
Used to set a property value and priority within this declaration block
The name of the CSS property. See the CSS property index.
The new value of the property.
The new priority of the property (e.g. "important").
SYNTAX_ERR: Raised if the specified value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or the property is readonly.
Used to set a property value and priority within this declaration block
The name of the CSS property. See the CSS property index.
The new value of the property.
SYNTAX_ERR: Raised if the specified value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or the property is readonly.
Used to retrieve the priority of a CSS property (e.g. the "important" qualifier) if the property
has been explicitly set in this declaration block.
The name of the CSS property. See the CSS property index.
A string representing the priority (e.g. "important") if one exists. The empty string if none exists.
Used to remove a CSS property if it has been explicitly set within this declaration block.
The name of the CSS property. See the CSS property index.
Returns the value of the property if it has been explicitly set for this declaration block.
Returns the empty string if the property has not been set or the property name does not correspond
to a known CSS property.
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly
or the property is readonly.
Used to retrieve the object representation of the value of a CSS property if it has been explicitly set
within this declaration block. This method returns null if the property is a shorthand property.
Shorthand property values can only be accessed and modified as strings, using the getPropertyValue and
setProperty methods.
The name of the CSS property. See the CSS property index.
Returns the value of the property if it has been explicitly set for this declaration block.
Returns null if the property has not been set.
Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block.
The name of the CSS property. See the CSS property index.
Returns the value of the property if it has been explicitly set for this declaration block.
Returns the empty string if the property has not been set.
Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block.
The name of the CSS property. See the CSS property index.
Returns the value of the property if it has been explicitly set for this declaration block.
Returns the empty string if the property has not been set.
The CSS rule that contains this declaration block or null if this CSSStyleDeclaration is not attached to a CSSRule.
The number of properties that have been explicitly set in this declaration block.
The range of valid indices is 0 to length-1 inclusive.
The parsable textual representation of the declaration block (excluding the surrounding curly braces).
Setting this attribute will result in the parsing of the new value and resetting of all the properties
in the declaration block including the removal or addition of properties.
SYNTAX_ERR: Raised if the specified CSS string value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or a property is readonly.
Used to retrieve the properties that have been explicitly set in this declaration block.
The order of the properties retrieved using this method does not have to be the order in which they were set.
This method can be used to iterate over all properties in this declaration block.
The name of the property at this ordinal position. The empty string if no property exists at this position.
The CSSStyleRule interface represents a single rule set in a CSS style sheet.
The constructor for CssStyleRule
The Regex match that found the charset rule
The parent rule or parent stylesheet
True if this instance is readonly
An array of strings that have been replaced in the string used for matching.
These needs to be put back use the DereplaceStrings method
The type of CssStyleSheet
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
The textual representation of the selector for the rule set. The implementation may
have stripped out insignificant whitespace while parsing the selector.
SYNTAX_ERR: Raised if the specified CSS string value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly
The entire text of the CssStyleRule
The declaration-block of this rule set.
The type of the rule. 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.
The interface is a concrete interface used to represent a CSS style sheet i.e.,
a style sheet whose content type is "text/css".
Constructor for CssStyleSheet
The XML processing instruction that references the stylesheet
The type of stylesheet
Constructor for CssStyleSheet
The XML style element that references the stylesheet
The type of stylesheet
Constructor for CssStyleSheet
The node that owns this stylesheet. E.g. used for getting the BaseUri
The URL of the stylesheet
The title of the stylesheet
List of medias for the stylesheet
The rule (e.g. ImportRule) that referenced this stylesheet
The type of stylesheet
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
Used to delete a rule from the style sheet.
The index within the style sheet's rule list of the rule to remove.
INDEX_SIZE_ERR: Raised if the specified index does not correspond to a rule in the style sheet's rule list.
NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is readonly.
Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade.
The parsable text representing the rule. For rule sets this contains both the selector and the
style declaration. For at-rules, this specifies both the at-identifier and the rule content.
The index within the style sheet's rule list of the rule before which to insert the specified rule.
If the specified index is equal to the length of the style sheet's rule collection, the rule will
be added to the end of the style sheet.
The index within the style sheet's rule collection of the newly inserted rule.
INDEX_SIZE_ERR: Raised if the specified index does not correspond to a rule in the style sheet's rule list.
NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is readonly.
HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the specified index
e.g. if an @import rule is inserted after a standard rule set or other at-rule.
SYNTAX_ERR: Raised if the specified rule has a syntax error and is unparsable.
The list of all CSS rules contained within the style sheet. This includes both rule sets and at-rules.
If this style sheet comes from an @import rule, the ownerRule attribute will contain
the CSSImportRule. In that case, the ownerNode attribute in the StyleSheet interface
will be null. If the style sheet comes from an element or a processing instruction,
the ownerRule attribute will be null and the ownerNode attribute will contain the Node.
The different types of CssStyleSheets
The stylesheet is a user agent stylesheet
The stylesheet is a author stylesheet
The stylesheet is a user stylesheet
The styles comes from a inline style attribute
Used internally for collection of styles for an element
Used internally for unknown properties
The CSSUnknownRule interface represents an at-rule not supported by this user agent.
The constructor for CssUnknownRule
The type of the rule. 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.
This implements the interface, which represents a simple or a complex value.
A object only occurs in a context of a CSS property.
Constructor for CssValue
The type of value
The entire content of the value
Specifies if the instance is read-only
Only for internal use
Detects what kind of value cssText contains and returns an instance of the correct CssValue class
The text to parse for a CSS value
Specifies if this instance is read-only
The correct type of CSS value
A string representation of the current value.
SYNTAX_ERR: Raised if the specified CSS string value has a syntax error
(according to the attached property) or is unparsable.
INVALID_MODIFICATION_ERR: Raised if the specified CSS string value represents a different
type of values than the values allowed by the CSS property
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly.
A code defining the type of the value as defined above
A XmlDocument with CSS support
Initializes a new instance of CssXmlDocument
Initializes a new instance of CssXmlDocument
The name table to use
Gets or sets a value indicating whether this handles DOM dynamic changes.
Sometimes (when loading or rendering) this needs to be disabled.
See for more information about use
true if static; otherwise, false.
All the stylesheets associated with this document
Loads a XML document, compare to XmlDocument.Load()
Adds a element type to be used as style elements (e.g. as in the HTML style element)
The namespace URI of the element
The local-name of the element
Sets the user agent stylesheet for this document
The URI to the stylesheet
Sets the user stylesheet for this document
The URI to the stylesheet
This method is used to retrieve the override style declaration for a specified element
and a specified pseudo-element.
The element whose style is to be modified. This parameter cannot be null.
The pseudo-element or null if none.
The override style declaration.
This method is used to get the computed style as it is defined in [CSS2].
The element whose style is to be computed. This parameter cannot be null.
The pseudo-element or null if none.
The computed style. The CSSStyleDeclaration is read-only and contains only absolute values.
Called when this element is changing in one of the following ways
- Text child added/removed/changed
- Element moved in the tree
Called when any parent element is changing. If an element is moved the CSS heirarchy for that element
will need to change.
Called when any attribute is changing. This is typically triggered by calls to
setAttribute() and should only be called from the CssXmlDocument.
This function allows each element to handle it's own behaviors for
attribute changing. By default, the cached computed style is invalidated
because most attributes refer to style properties.
The attribute that is changing.
Called when any child node is changing. If an element is moved the CSS heirarchy for that element
will need to change. This is mainly useful when one of the child nodes parent is a
referenced node (for example in a <use> element.
Only used for testing!
Creates a static section for a CssXmlDocument.
Typical use:
using(StaticSection.Use(doc))
{
// blah blah
}
Previous Static state
Document to be handled
Initializes a new instance of the class.
The CSS XML document.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Uses the specified CSS XML document with Static state to true.
The CSS XML document.
The MediaList interface provides the abstraction of an ordered collection of media,
without defining or constraining how this collection is implemented. An empty list
is the same as a list that contains the medium "all".
The items in the MediaList are accessible via an integral index, starting from 0.
Compares this MediaList with another and see if the second fits this
The MediaList to compare
True if this list fits the specified
Adds the medium newMedium to the end of the list. If the newMedium is already used, it is first removed.
The new medium to add.
INVALID_CHARACTER_ERR: If the medium contains characters that are invalid in the underlying style language.
NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is readonly.
Deletes the medium indicated by oldMedium from the list.
The medium to delete in the media list.
NOT_FOUND_ERR: Raised if oldMedium is not in the list.
NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is readonly.
The number of media in the list. The range of valid media is 0 to length-1 inclusive.
The parsable textual representation of the media list. This is a comma-separated list of media.
SYNTAX_ERR: Raised if the specified string value has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is readonly.
Returns the indexth in the list. If index is greater than or equal to the
number of media in the list, this returns null.
Returns the indexth in the list. If index is greater than or equal to the
number of media in the list, this returns null.
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.
In XML, this interface represents an external style sheet, included via a style sheet processing instruction.
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
The intended destination media for style information. The media is often specified in the
ownerNode. If no media has been specified, the MediaList will be empty. See the media
attribute definition for the LINK element in HTML 4.0, and the media pseudo-attribute
for the XML style sheet processing instruction . Modifying the media list may cause a
change to the attribute disabled.
The advisory title. The title is often specified in the ownerNode. See the title
attribute definition for the LINK element in HTML 4.0, and the title pseudo-attribute
for the XML style sheet processing instruction.
If the style sheet is a linked style sheet, the value of its attribute is its location.
For inline style sheets, the value of this attribute is null. 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.
The resolved absolute URL to the stylesheet
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 null.
The node that associates this style sheet with the document. For HTML, this may be
the corresponding LINK or STYLE element. For XML, it may be the linking processing
instruction. For style sheets that are included by other style sheets, the value
of this attribute is null.
false if the style sheet is applied to the document. true if it is not. Modifying
this attribute may cause a new resolution of style for the document. A stylesheet
only applies if both an appropriate medium definition is present and the disabled
attribute is false. So, if the media doesn't apply to the current user agent,
the disabled attribute is ignored.
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.
The StyleSheetList interface provides the abstraction of an ordered collection of style sheets.
The items in the StyleSheetList are accessible via an integral index, starting from 0.
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
A CssStyleDeclaration that holds the collected styles
Used to find matching style rules in the cascading order
The element to find styles for
The pseudo-element to find styles for
The medialist that the document is using
A CssStyleDeclaration that holds the collected styles
The number of StyleSheets in the list. The range of valid child stylesheet indices is 0 to length-1 inclusive.
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 null.