liveBook · Manning

Browser developer tools

As explained in CSS in Depth, Second Edition

Browser developer tools are built-in utilities for inspecting and debugging a webpage's structure, styles, and runtime behavior.

Browser developer tools make otherwise abstract CSS behavior visible. Inspect an element to see which selectors apply, how specificity orders them, which declarations are overridden, and which values arrive through inheritance. section 1.2

Use the inspection workflow to locate the source of a styling result:

  • Right-click the element and choose Inspect or Inspect Element. section 1.2
  • Read the style inspector from higher to lower priority; crossed-out declarations have been overridden. section 1.2
  • Check inherited properties and follow each stylesheet filename and line number back to its source rule. section 1.2
  • Filter declarations when many rules obscure the property you are investigating. section 1.2

Tracing an inherited font

Set a font on the body, then inspect a descendant element. The inspector shows the inherited value and reveals whether a more specific rule overrides it. This connects the visible result to the rule that produced it. section 1.2

Figure 14.11 Interactive clip-path editing in Firefox
figure

Firefox DevTools can turn clip-path editing into a visual task: drag polygon vertices or shape handles and watch the CSS change in the Rules pane. section 14.3.2

Use DevTools not only when a style is broken, but also when a page behaves impressively: inspect it, identify the rules behind the result, and test how the pieces work together. section 17.6

How CSS in Depth, Second Edition covers it

How deep it goes
Shows rule ordering, inheritance, overrides, source locations, filtering, and interactive clip-path editing.
Examples
Uses inherited fonts, crossed-out declarations, filtered properties, and draggable clip-path vertices as inspection examples.
What you can do after
Diagnose/debug with browser DevTools by locating the rule, inheritance path, or clip-path value behind a rendered result.
How it connects
Connects CSS selectors, specificity, the cascade, inheritance, clip paths, and stylesheet source code.

Also explained in

Compare how 2 books explain browser developer tools →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of CSS in Depth, Second Edition. The section links point to the parts of the book it draws on.