Inheritance
When no value is specified for a property, the value of the parent element property can be inherited as part of the defaulting process. It’s worth noting however that not all property values are automatically inherited. For example, developers likely wouldn’t want a width property to be inherited by child elements for a layout.
Controlling Inheritance
Developers can assign special property values in order to control inheritance if needed.
inherit
will trigger the inheritance of the computed value of its parent element and can be applied to any CSS property.
initial
applies the initial or default value of a property as set by the browser.
unset
resets the property to its inherited value if available or to its initial value if not. unset
can be thought of as a conditional combination of inherit
and initial
revert
is a newer option but not widely supported by major browsers. It will rollback the value of a property to the value it would have if no changed had been made within the context of its origin.
Further Review
- Cascade and inheritance - Learn web development | MDN
- Inheritance - CSS: Cascading Style Sheets | MDN