CSS inheritance

The CSS rule that some properties, mostly text-related ones like color and font, pass their value from a parent to its descendants unless overridden.

In more detail

Layout properties such as width, margin and display are not inherited. Custom properties are inherited, which is what makes theming by scope work.

Related terms

Taught in

References