pub struct CssRuleMetric {
pub line: u32,
pub col: u32,
pub specificity_a: u16,
pub specificity_b: u16,
pub specificity_c: u16,
pub complexity: u16,
pub declaration_count: u16,
pub important_count: u16,
pub nesting_depth: u8,
}Expand description
Structural CSS metrics for a single style rule, computed from the parsed CSS
syntax tree. A rule is recorded only when it crosses a structural floor (an
id selector, a complex selector, a !important declaration, or deep
nesting), so the vector stays bounded on normal stylesheets.
Not persisted in the extraction cache: fallow health computes these
on demand from the CSS source, so there is no bitcode derive.
Fields§
§line: u321-based line of the rule’s first selector.
col: u321-based column of the rule’s first selector.
specificity_a: u16Specificity component a (id selectors), max across the rule’s selectors.
specificity_b: u16Specificity component b (class / attribute / pseudo-class selectors).
specificity_c: u16Specificity component c (type / pseudo-element selectors).
complexity: u16Largest selector component count across the rule’s selector list.
declaration_count: u16Declaration count in the rule (normal plus !important).
important_count: u16!important declaration count in the rule.
nesting_depth: u8Style-rule nesting depth (0 = top level).