CSS Cascade and Inheritance

Browsers use a complex process to determine the styling applied to a site and it’s important for developers to have an understanding how this process works in order to correctly apply styling to the solutions they build.

The cascade in CSS is designed to allow multiple style sheets to affect the styling of a webpage. With multiple sources of styling information, an element or selector could have conflicting associated declarations in need of resolution.

In contrast, when no declarations for an element or property are present in style sheets, the defaultingopen in new windowprocess will determine values either by inheriting a value from a parent or referencing the initial value of the element.

Other considerations include the order of appearance, the !important declaration, use of the @importrule and more.

Further Review

See Also