notes src css-specificity.md
510 B · 11 lines
Markdown
at main

CSS Specificity #

When two @[CSS][] @[selectors][css-selector] apply the same rule to one @[HTML][] element, the specificity of the selectors is used to determine which should take precedence: whichever rule has most specificity is used.

Refer to the MDN documentation on how that is calculated, or use the calculator to find the specificity of a particular selector.