CSS computed value 2026-11-05
A CSS computed value is the result of processing a property's specified value as far as possible without performing the layout-dependent calculations reserved for later stages. Computation resolves details such as inheritance and many relative units; the exact rule belongs to each CSS property.[ref]
For example, if a parent has a computed font size of 20 CSS pixels and its child specifies font-size: 150%, the child's computed size is 30 pixels. A descendant inheriting that font size receives the computed result, rather than the original percentage expression.
Not every relative expression disappears at this stage. A percentage width can remain a percentage until the containing width is known. Similarly, a unitless line-height: 1.5 computes as a number under that property's definition; when inherited by text with a 24-pixel font size, it can yield a 36-pixel used line height. Copying the parent's final pixel height would be a different operation.[ref][ref]
The computed stage therefore supplies a stable representation for inheritance without promising that every value is a final numeric measurement. To turn it into a CSS used value, the formatter can still need containing dimensions, content measurements and the relevant box-layout algorithm.
CSS inheritance 2026-11-05
CSS inheritance propagates property values from a parent element to a child when the property's defaulting rules call for it. For an inherited property, the child normally receives the parent's CSS computed value if it has no applicable declaration supplying another value. A property that is not inherited instead normally uses its CSS initial value. The root has no parent from which to inherit.[ref]
Suppose a parent has font-size: 20px and a child specifies font-size: 150%. The child computes to 30 CSS pixels. If a grandchild merely inherits font size, it receives 30 pixels; it does not multiply the original 150 percent again. This is why inheriting a computed value differs from copying the parent's source text.
The keyword inherit can request inheritance even for a property that does not normally inherit. Thus a width declaration with that keyword is a deliberate instruction, whereas omitting width does not automatically copy the parent's width. The exact result still depends on that property's value-processing rules.[ref]
Importance does not spread down the tree as selector priority. If a parent obtains red from an important color declaration, a child with its own ordinary blue color declaration can be blue. The parent contributed a possible inherited value; it did not create an important declaration on the child. Distinguishing CSS inheritance from the CSS cascade explains both shared styling and local overrides.
CSS property value 2026-11-05
A CSS property value is a value considered or assigned for a CSS property. Its representation changes through value processing: declarations supply candidates, the CSS cascade chooses among applicable candidates, defaulting supplies missing values, and computation and layout resolve further details. The CSS computed value and CSS used value consequently describe different stages.[ref]
Take width: 50%. In a simple block layout, its computed representation can retain a percentage, while the used width depends on the containing width. A 400-CSS pixel containing block gives 200 pixels; changing that block to 600 pixels gives 300. Copying the source string alone would miss why the physical layout changed.
Inheritance can resolve another value before that stage. If a parent's computed font size is 20px and its child specifies font-size: 150%, the child can compute to 30px. That child's descendant inheriting the font size receives the computed result, rather than repeatedly multiplying by the original percentage merely because it is further down the tree.[ref]
Validity is property-specific. A syntactically readable width: blue is not a valid width value, and its failure does not establish a used width of blue or zero. Initial values, CSS inheritance and other applicable declarations determine the result under the relevant rules. Stating the value stage prevents a source token, a computed representation and a measured rendering from being conflated.
CSS used value 2026-11-05
A CSS used value is a value obtained after applying the calculations needed for layout. It can depend on geometry unavailable when the CSS computed value was established, such as the size of a CSS containing block or the sizes of related content.[ref]
For example, an ordinary block whose computed width remains 50 percent can have a used content width of 200 CSS pixels in a 400-pixel containing block. Changing that containing block to 600 pixels yields 300 pixels, with the same computed percentage and with other constraints held fixed. The changed result follows from layout context rather than from a new source declaration.
A used width is also not necessarily the size of the whole outer box. With content-box sizing, padding, borders and margins are accounted for outside the content width. With box-sizing: border-box, the sizing edge is different. CSS minimum size and CSS maximum size constraints can alter the final result as well.[ref]
Even after the used value has been determined, drawing on a particular device can require rounding or other permitted approximation. A fractional CSS length and a count of illuminated physical pixels are consequently different measurements. Stating the property, value stage, sizing edge and coordinate units makes a layout calculation reproducible.