Course contentsShow
← Web Development
Lesson 2180 of 2,98240. Browser DevTools Deep DiveFree lesson

Understanding CSS Specificity Indicators

Reading strikethrough styles, specificity symbols, and overridden properties to debug CSS conflicts.

Understanding CSS Specificity Indicators

You'll learn how to use DevTools to identify which CSS rules are winning or losing the specificity battle.

When debugging CSS conflicts in the browser DevTools, you'll often see styles with strikethrough text, mysterious symbols, and competing declarations. These visual indicators tell the story of CSS specificity—which rules are applied and which are overridden.

Reading Strikethrough Styles

When a CSS property appears with a strikethrough, it means that property has been overridden by a more specific rule elsewhere. The strikethrough is your first clue that a specificity conflict exists. The actual applied style will appear elsewhere in the Styles panel without the strikethrough.

Specificity Symbols

Modern DevTools display specificity weights next to selectors, often as three numbers like (0,1,0) or (1,0,1). Think of these as a three-tier ranking system:

  • First number: IDs (#header)
  • Second number: Classes, attributes, pseudo-classes (.button, [type="text"], :hover)
  • Third number: Elements and pseudo-elements (div, p, ::before)

Higher numbers in the leftmost positions win. An ID selector (1,0,0) always beats a class selector (0,1,0), no matter how many classes you stack.

Debugging Overridden Properties

When multiple rules target the same property, DevTools shows them in specificity order—most specific at the top. Scan down the list to see why your style isn't applying. Look for inline styles (highest specificity), !important flags (nuclear option), or simply more specific selectors.

Key Takeaway: Use DevTools' strikethrough styles and specificity indicators to trace exactly which CSS rules are winning conflicts and why, making debugging predictable rather than frustrating.