CSS cascading and inheritance
TheCSS cascading and inheritance module defines the rules for assigning values to properties by way of cascading and inheritance. This module specifies the rules for finding the specified value for all properties on all elements.
One of the fundamental design principles of CSS is cascading of rules. It allows several style sheets to influence the presentation of a document. CSS property-value declarations define how a document is rendered. Multiple declarations may set different values for the same element and property combination, but only one value can be applied to any CSS property. The CSS cascade module defines how these conflicts are resolved.
The opposite also occurs. Sometimes there are no declarations defining the value of a property. The CSS cascade module defines how these missing values should be set via inheritance or from the property's initial value.
Note:The rules for finding the specified values in the page context and its margin boxes are described in theCSS page module.
In this article
Reference
>Properties
At-rules and descriptors
Keywords
Interfaces
Glossary terms and definitions
Guides
- Introducing the CSS Cascade
Guide to the cascade algorithm that defines how user agents combine property values originating from different sources.
- CSS inheritance
A guide to CSS inheritance.
- Learn: Handling conflicts
The most fundamental concepts of CSS — the cascade, specificity, and inheritance — which control how CSS is applied to HTML and how conflicts are resolved.
- Learn: Cascade layers
Introduction tocascade layers, a more advanced feature that builds on the fundamental concepts of theCSS cascade andCSS specificity.
Related concepts
Specifications
| Specification |
|---|
| CSS Cascading and Inheritance Level 4> |
| CSS Cascading and Inheritance Level 5> |
| CSS Cascading and Inheritance Level 6> |