pub struct CssRule {
pub style_sheet_id: Option<StyleSheetId>,
pub selector_list: SelectorList,
pub nesting_selectors: Option<Vec<String>>,
pub origin: StyleSheetOrigin,
pub style: CssStyle,
pub media: Option<Vec<CssMedia>>,
pub container_queries: Option<Vec<CssContainerQuery>>,
pub supports: Option<Vec<CssSupports>>,
pub layers: Option<Vec<CssLayer>>,
pub scopes: Option<Vec<CssScope>>,
pub rule_types: Option<Vec<CssRuleType>>,
pub starting_styles: Option<Vec<CssStartingStyle>>,
}
Expand description
CSS rule representation. CSSRule
Fields§
§style_sheet_id: Option<StyleSheetId>
The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
selector_list: SelectorList
Rule selector data.
nesting_selectors: Option<Vec<String>>
Array of selectors from ancestor style rules, sorted by distance from the current rule.
origin: StyleSheetOrigin
Parent stylesheet’s origin.
style: CssStyle
Associated style declaration.
media: Option<Vec<CssMedia>>
Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
container_queries: Option<Vec<CssContainerQuery>>
Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.
supports: Option<Vec<CssSupports>>
@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
layers: Option<Vec<CssLayer>>
Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
scopes: Option<Vec<CssScope>>
@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
rule_types: Option<Vec<CssRuleType>>
The array keeps the types of ancestor CSSRules from the innermost going outwards.
starting_styles: Option<Vec<CssStartingStyle>>
@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.