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,
pub selector: String,
}Expand description
Structural CSS metrics for one style rule of the parsed CSS. Only a rule
over a structural floor (an id selector, a complex selector, !important,
or deep nesting) is recorded, so the vector stays bounded. Not cached:
fallow health computes these from the CSS source (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).
selector: StringSelector list of a notable rule, for audit keys. Never serialized.