Cascade
The CSS cascade is the process that resolves competing applicable style declarations to determine the styles applied to an element.
CSS in Depth, Second Edition
The CSS cascade is the process that selects a property value from competing declarations according to their applicability, origin, importance, specificity, and source order.
- How it is used
- Resolves conflicting CSS declarations so page styles remain predictable as rules and markup change.
- How deep it goes
- Works through origins, importance, specificity, and source-order ties, then points to layers without detailing their mechanics here.
- Examples
- Uses a page heading with competing font rules, a featured navigation link, and fallback background colors.
- What you can do after
- Diagnose/debug conflicting CSS rules and choose selectors or declaration order with their effects elsewhere on the page in mind.
WordPress Power Toolkit: Harness AI to build next-level websites
The CSS cascade is the rule-resolution process that determines which CSS declarations apply when multiple declarations match an element.
- How it is used
- Resolves competing CSS declarations so a website designer can understand which visible style takes effect.
- How deep it goes
- Explains repeated properties through a heading-color example and a four-level WordPress model, without detailing further resolution rules.
- Examples
- Uses competing heading colors, a four-level cascade illustration, inline color snippets, and crossed-out properties in the Inspector.
- What you can do after
- Diagnose/debug with it by inspecting overridden CSS properties and testing visual changes in the browser’s Inspector.
Read how WordPress Power Toolkit: Harness AI to build next-level websites explains cascade →
D3.js in Action, Third Edition
The CSS cascade is the algorithm that resolves competing declarations by considering their origin, importance, specificity, and source order.
- How it is used
- Organizes SVG presentation choices across D3 attributes, inline styles, and external CSS.
- How deep it goes
- Demonstrates precedence with a three-way SVG fill example but does not work through the full cascade algorithm.
- Examples
- Uses a D3 rectangle with turquoise, plum, and orange fill declarations to make precedence visible.
- What you can do after
- Apply it via D3 and CSS to choose predictable styling sources and diagnose which declaration controls an SVG property.
Web Design Playground, Second Edition
The CSS cascade is the algorithm that resolves competing style rules from different sources to determine the style applied to an element.
- How it is used
- Resolves competing CSS declarations so the browser can determine an element's final style.
- How deep it goes
- Explains source priority, inheritance, and specificity, but defers the cascade's full complexity until advanced CSS work.
- Examples
- Uses a red internal div rule competing with a blue inline declaration.
- What you can do after
- Diagnose/debug with it by predicting which competing CSS declaration the browser will apply.
Read how Web Design Playground, Second Edition explains cascade →
Web Design Playground
The CSS conflict-resolution mechanism that determines which style rule applies when multiple style sources overlap.
- How it is used
- Resolves overlapping CSS declarations when browser, user, and author styles meet on an element.
- How deep it goes
- Explains source priority and same-source specificity with a concrete conflict, rather than detailing the complete browser algorithm.
- Examples
- Uses a div with red internal styling and blue inline styling to demonstrate which declaration wins.
- What you can do after
- Diagnose CSS conflicts by comparing declaration sources and selector specificity.
Vanilla Web
The CSS cascade is the rule system that resolves competing style declarations according to origin, importance, specificity, and source order.
- How it is used
- Explains how CSS rules reach custom-element hosts and, without a shadow root, their page-DOM contents.
- How deep it goes
- Demonstrates host styling and page-DOM style reach, but does not work through cascade-priority calculations.
- Examples
- Contrasts a page button rule reaching a component button with a component h1 rule reaching a page heading.
- What you can do after
- Diagnose/debug with it when unexpected styles reach into or out of a page-DOM custom element.
Also covered in
What to know first
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- CSS selectorA CSS selector is a pattern that matches elements in a document according to their names, attributes, relationships, states, or other conditions.
- HTMLHTML is the standard markup language for structuring content and elements in documents on the web.
- style attributeThe style attribute is an HTML or SVG attribute whose value contains CSS declarations applied directly to that element.
Related concepts
- inheritancecontrasts with · Inheritance is a mechanism in which a derived type or descendant element receives properties or behavior from a parent, subject to rules that may allow specialization or overriding.
- CSSpart of · CSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- specificityuses · CSS specificity is the priority assigned to a selector that helps determine which matching declaration takes precedence in the cascade when styles conflict.
- cascade layerhas part · A CSS cascade layer is a named or anonymous group of declarations whose precedence is explicitly ordered within the cascade.
- cascaded valueproduces · A cascaded value is the property value selected by the CSS cascade for a particular element and property.
- CSS source orderconfigured by · CSS source order is the relative ordering of declarations that determines which declaration prevails when competing declarations have equal cascade precedence.
Questions about cascade
What is cascade?
The CSS cascade is the process that resolves competing applicable style declarations to determine the styles applied to an element.
Which Manning books explain cascade?
CSS in Depth, Second Edition, WordPress Power Toolkit: Harness AI to build next-level websites, D3.js in Action, Third Edition, Web Design Playground, Second Edition, Web Design Playground and Vanilla Web.
What should I know before learning cascade?
Manning books that teach cascade usually introduce CSS, CSS selector, HTML and style attribute first.
What is the difference between cascade and inheritance?
The CSS cascade is the process that resolves competing applicable style declarations to determine the styles applied to an element. Inheritance is a mechanism in which a derived type or descendant element receives properties or behavior from a parent, subject to rules that may allow specialization or overriding.
What is cascade part of?
Cascade is part of CSS. CSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
What are the parts of cascade?
Cascade includes cascade layer.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.





