calculateSelectorsSpecificity
fun calculateSelectorsSpecificity(prelude: Prelude.Selector): Map<SelectorListItem, CssSpecificity>(source)
Calculates the specificity of a CSS rule.
Specificity is a weight that is applied to CSS rules to determine which one is applied when multiple rules target the same element.
It is calculated based on the selectors in the rule's prelude.
Return
A map where the keys are the selector list items and the values are the CssSpecificity of each selector in the rule's prelude.
Parameters
prelude
The prelude of the CSS rule.