CssStyleRule Class

https://drafts.csswg.org/cssom/#the-cssstylerule-interface

public sealed class CssStyleRule : CssGroupingRule
Inheritance
CssGroupingRule CssStyleRule

Properties

NameDescription
SelectorTextGets or sets the serialized selector list of the rule.
SelectorsThe parsed selector list of the rule (the parsed form of CssStyleRule.SelectorText).
StyleGets the declaration block of the rule.
StyleMapThe declarations of the rule as CssStyleValue objects (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssstylerule-stylemap).
TypeGets the legacy numeric type of the rule: CssRule.StyleRule for style rules.

SelectorText

CSSRules.cs

Gets or sets the serialized selector list of the rule.

public string SelectorText { get; set; }

Selectors

CSSRules.cs

The parsed selector list of the rule (the parsed form of CssStyleRule.SelectorText).

public SelectorList Selectors { get; }

Property value

SelectorList

Gets the declaration block of the rule.

public CssStyleProperties Style { get; }

StyleMap

CSSRules.cs

The declarations of the rule as CssStyleValue objects (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssstylerule-stylemap).

public StylePropertyMap StyleMap { get; }

Gets the legacy numeric type of the rule: CssRule.StyleRule for style rules.

public override ushort Type { get; }

Property value

ushort