CSS Cascading and Inheritance Level 3 CR Test Suite

Defaulting (32 tests)

Test Refs Flags Info
+ 7 Defaulting
+ 7.1 Initial Values
+ 7.2 Inheritance
c13-inh-underlin-000 Inheritance
c13-inheritance-000 = Inheritance
c548-ln-ht-003 = AhemBitmaps line-height
c548-ln-ht-004 = AhemBitmaps line-height
cascade-precedence-001 cascade mechanism has precedence over inheritance - font boldness
  • When determining the specified value of a property, the cascade mechanism of (user agent, author, user) style sheets has precedence. If no value results from such mechanism, then the property may inherit from its parent. In this testcase, it is presumed that b elements are specified in the user agents style sheets to embold their text content.
cascade-precedence-002 cascade mechanism has precedence over inheritance - font styling
  • When determining the specified value of a property, the cascade mechanism of (user agent, author, user) style sheets has precedence. If no value results from such mechanism, then the property may inherit from its parent. In this testcase, it is presumed that i elements are specified in the user agents style sheets to italicize their text content.
inherited-value-001 Inheritance
  • Children elements can inherit properties from parents.
+ 7.3 Explicit Defaulting
+ 7.3.1 Resetting a Property: the initial keyword
initial-color-background-001 = CSS Cascade: the "initial" value
  • initial is not the same as inherit. color:initial results in non-red. background-color:initial results in transparent.
+ 7.3.2 Explicit Inheritance: the inherit keyword
dynamic-top-change-001 = DOM/JS 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/JS 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/JS 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/JS 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 ComboDOM/JS 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/JS 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/JS 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.
inherit-static-offset-001 = Bitmaps top and left - inherit keyword on element with statically positioned parent
  • When using the 'inherit' reserved keyword value, the property takes the same specified value as the property for the element's parent, even in cases where such property does not apply. This test covers the case where the parent has absolute value lengths for left and top.
inherit-static-offset-002 = Bitmaps top and left - inherit keyword on element with statically positioned parent
  • When using the 'inherit' reserved keyword value, the property takes the same specified value as the property for the element's parent, even in cases where such property does not apply. This test covers the case where the parent has percentage value lengths for left and top. Box offset specified as a percentage refer to the height (for top and bottom) or to the width (for left and right) of its containing block. If an element's position is 'relative', then its containing block is formed by the content edge of the nearest block container ancestor box.
inherit-static-offset-003 = Bitmaps top and left - inherit keyword on element with statically positioned parent
  • When using the 'inherit' reserved keyword value, the property takes the same specified value as the property for the element's parent, even in cases where such property does not apply. This test covers the case where the parent has relative value lengths for left and top.
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 = Bitmaps 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 = Bitmaps 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 = Bitmaps 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 = Bitmaps 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 - like in this testcase - , the computed value is the specified percentage value of such nearest positioned ancestor.
top-114 = position relative - 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.
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.
+ 7.3.3 Erasing All Declarations: the unset keyword
unset-val-001 = CSS Cascade: the "unset" value
  • color:unset is the same as color:inherit since color is an inherited property. background-color:unset is the same as background-color:initial since background-color is a non-inherited property.
unset-val-002 = CSS Cascade: the "unset" value
  • display:unset should be the same as display:initial since 'display' is not an inherited property. display:unset should be the same as display:inline since 'inline' is the initial value of 'display'.