Class CSSStyleRule
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The CSSStyleRule interface represents a single CSS style rule.
[Value("CSSStyleRule")]
public class CSSStyleRule : CSSGroupingRule
- Inheritance
-
CSSStyleRule
- Inherited Members
Remarks
Constructors
CSSStyleRule()
public CSSStyleRule()
Properties
SelectorText
The selectorText property of the CSSStyleRule interface gets and sets the selectors associated with the CSSStyleRule.
[Value("selectorText")]
public string SelectorText { get; set; }
Property Value
- string
A string.
Remarks
Style
The read-only style property of the CSSStyleRule interface contains a CSSStyleProperties object representing the properties list in this style rule's body.
[Value("style")]
public CSSStyleProperties Style { get; }
Property Value
- CSSStyleProperties
A CSSStyleProperties object.
Although theNOTE
Earlier versions of the specification returned a CSSStyleDeclaration, which is now the base class of CSSStyleProperties.
See the browser compatibility table for browser support information.styleproperty itself is read-only in the sense that you can't replace theCSSStylePropertiesobject, you can still assign to thestyleproperty directly, which is equivalent to assigning to its CSSStyleDeclarationcssText property. You can also modify theCSSStylePropertiesobject using the CSSStyleDeclarationsetProperty and CSSStyleDeclarationremoveProperty methods.
Remarks
Each CSS property supported by the browser is present on the object.
The properties that are not defined inline in the corresponding CSS declaration are set to the empty string ("").
StyleMap
The styleMap read-only property of the
CSSStyleRule interface returns a 'StylePropertyMap' object
which provides access to the rule's property-value pairs.
[Value("styleMap")]
public StylePropertyMap StyleMap { get; }
Property Value
- StylePropertyMap
A 'StylePropertyMap' object.