CSS: global keywords (property values)

By Xah Lee. Date: . Last updated: .

CSS global values are keywords that can be applied to any property, overriding or bypassing normal cascade rules.

inherit

the computed value from its parent element.

initial

the initial value as defined by the CSS specification.

unset

value is:

  • inherit → if the property belongs to a type that is naturally inherited.
  • initial → if the property belongs to a type that is not inherited.

example of inherited properties:

  • color
  • font-family
  • font-size
  • text-align
  • line-height
  • visibility

example of non-inherited properties:

  • border
  • margin
  • padding
  • background
revert

browser's default value.

revert-layer

Resets the property to the value set by the previous Cascade Layer , allowing for specific layer-based overrides.

CSS, misc, advanced