6.2.1 The 'inherit' value

Chapter 6 - Assigning property values, Cascading, and Inheritance - 6.2.1 The 'inherit' value

Go to the relevant page of the specification.

dynamic-top-change-001 (dom)
Inheriting 'top' changes from relpos grandparent
The position of a positioned element which inherits its 'top' value from its relatively positioned grandparent changes when the grandparent's 'top' value is changed.
dynamic-top-change-002 (dom)
Inheriting 'top' changes from parent table-row through anonymous table boxes
The position of a positioned element which inherits its 'top' value from its parent changes when the parent's 'top' value is changed even if the parent is display:table-row.
dynamic-top-change-003 (dom)
Inheriting 'top' changes from parent table through anonymous table boxes
The position of a positioned element which inherits its 'top' value from its parent changes when the parent's 'top' value is changed even if the parent is display:table.
dynamic-top-change-004 (dom)
Inheriting 'top' changes from abspos parent
The position of a positioned element which inherits its 'top' value from its parent changes when the parent's 'top' value is changed.
dynamic-top-change-005 (combo, dom)
Inheriting 'top' changes from abspos grandparent
The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed.
dynamic-top-change-005a (dom)
Inheriting 'top' changes from abspos grandparent (variant: block parent)
The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed.
dynamic-top-change-005b (dom)
Inheriting 'top' changes from abspos grandparent (non-dynamic variant)
The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed.
height-inherit-001
Inheriting Explicit Heights
The computed height is inherited, even if the 'height' property does not apply.
inherit-001
Inherit keyword
Children elements inherit the parents color given the 'inherit' keyword.
inherit-002
Inherit on non-inherited properties
Inherit can be used on properties which are not normally inherited.
inherit-003
Inherit on the root element
If the 'inherit' value is set on the root element, the property is assigned its initial value.
left-offset-percentage-002
position absolute - left offset percentage and inherit
'left: inherit' makes the left property take the same computed value as the left property for the element's parent; in the case of a percentage value, the computed value is the specified percentage value. 'left: [percentage]' refers to width of containing block.
margin-em-inherit-001 (image)
inherit applied on margin set with em
The 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used. When inherit keyword is used, the property takes the same computed value - a length value in this testcase - as the property for the element's parent.
margin-percentage-inherit-001 (image)
margin - inherit applied on margin percentage
A margin percentage is calculated with respect to the width of the generated box's containing block. When inherit keyword is used, the property takes the same computed value - a percentage value in this testcase - as the property for the element's parent.
padding-em-inherit-001 (image)
inherit applied on padding set with em
The 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used. When inherit keyword is used, the property takes the same computed value - a length value in this testcase - as the property for the element's parent.
padding-percentage-inherit-001 (image)
padding - inherit applied on padding percentage
A padding percentage is calculated with respect to the width of the generated box's containing block. When inherit keyword is used, the property takes the same computed value - a percentage value in this testcase - as the property for the element's parent.
position-absolute-percentage-inherit-001
position absolute - dimensions and position given by offset percentages and inherit
Absolutely positioned boxes can be dimensioned and positioned solely by setting offset 'top', 'right', 'bottom' and 'left' property values with percentage unit and then with inherit keyword. 'inherit' on a offset property makes such offset property take the same computed value as the offset property of the nearest positioned ancestor; in the case of a percentage value, the computed value is the specified percentage value of such nearest positioned ancestor.
top-offset-percentage-002
position absolute - top offset percentage and inherit
'top: inherit' makes the top property take the same computed value as the top property for the element's parent; in the case of a percentage value, the computed value is the specified percentage value. 'top: [percentage]' refers to height of containing block.