This translation is incomplete. Please help translate this article from English
The computed value of a CSS property is computed from the specified value by:
- Handling the special values
- Doing the computation needed to reach the value described in the "Computed value" line in the property's summary.
The computation needed to reach the computed value for the property typically involves converting relative values (such as those in
em units or percentages) to absolute values.
For example, if an element has specified values
font-size: 16px and
padding-top: 2em, then the computed value of
32px (double the font size).
However, for some properties (those where percentages are relative to something that may require layout to determine, such as
top), percentage specified values turn into percentage computed values. Additionally, unitless numbers specified on the
line-height property become the computed value, as specified. These relative values that remain in the computed value become absolute when the used value is determined.
|CSS Level 2 (Revision 1)
The definition of 'computed value' in that specification.
- CSS Reference
- CSS Key Concepts: CSS syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values. Definitions of value syntax, shorthand properties and replaced elements.