CSS2.1 Conformance Test Suite

Chapter 10 - Visual formatting model details (280 tests)

Test Flags
10 Visual formatting model details
10.1 Definition of "containing block"
Containing block for relative positioned elements is nearest block-level ancestor
If the element's position is 'relative', the containing block is formed by the content edge of the nearest block-level ancestor box.
Containing block for relative positioned elements is nearest table cell ancestor
If the element's position is 'relative', the containing block is formed by the content edge of the nearest table cell ancestor box.
Containing block for relative positioned elements is nearest inline-block ancestor
If the element's position is 'relative', the containing block is formed by the content edge of the nearest inline-block ancestor box.
Containing block for static positioned elements is nearest block-level ancestor
If the element's position is 'static', the containing block is formed by the content edge of the nearest block-level ancestor box.
Containing block for static positioned elements is nearest table cell ancestor
If the element's position is 'static', the containing block is formed by the content edge of the nearest table cell ancestor box.
Containing block for static positioned elements is nearest inline-block ancestor
If the element's position is 'static', the containing block is formed by the content edge of the nearest inline-block ancestor box.
Initial containing block for fixed positioned elements
The containing block is established by the viewport when an element uses fixed positioning.
Containing block for absolute positioned elements is nearest positioned (absolute) ancestor
If the element has 'position: absolute', the containing block is established by the nearest positioned ancestor.
Containing block for absolute positioned elements is nearest positioned (relative) ancestor
If the element has 'position: absolute', the containing block is established by the nearest positioned ancestor.
Containing block for absolute positioned elements is nearest positioned (fixed) ancestor
If the element has 'position: absolute', the containing block is established by the nearest positioned ancestor.
Containing Blocks - Inline-level elements position based on left-to-right direction and parent element is relative
If the ancestor is inline-level, positioned absolute, and direction is left-to-right, the top/left of the containing block determines the top/left padding edges of the first box generated by the ancestor.
Containing Blocks - Inline-level elements position based on left-to-right direction and parent element is absolute
If the ancestor is inline-level, positioned absolute, and direction is left-to-right, the top/left of the containing block determines the top/left padding edges of the first box generated by the ancestor.
Containing Blocks - Inline-level elements position based on left-to-right direction and parent element is fixed
If the ancestor is inline-level, positioned absolute, and direction is left-to-right, the top/left of the containing block determines the top/left padding edges of the first box generated by the ancestor.
Containing Blocks - Block-level elements position based on left-to-right direction and parent element is relative
The containing block is formed by the padding edge for block-level elements.
Containing Blocks - Block-level elements position based on left-to-right direction and parent element is absolute
The containing block is formed by the padding edge for block-level elements.
Containing Blocks - Block-level elements position based on left-to-right direction and parent element is fixed
The containing block is formed by the padding edge for block-level elements.
Containing Blocks - Fall back to Initial containing block
When there are no positioned ancestors then the initial containing block is used.
Containing block and absolutely positioned element in paged media positioned off first page P
An absolutely positioned element positioned beyond the boundaries of the page being laid out can be omitted, rendered on the current page or on a following page.
page-break-inside:auto P
The 'auto' value of the 'page-break-inside' property neither forces nor forbids a page break inside the box.
Paged Media Canvas Background P
For documents in the html namespace, a background on 'html' will cover the page area but not the margin area.
Paged Media Body Background P
For documents in the html namespace, a background on 'body' will cover the page area.
Containing block for fixed positioning
Containing block for absolute positioning
Containing block for absolute positioning
Containing block for absolute positioning
Containing block for absolute positioning
Containing block for absolute positioning
Containing block for absolute positioning
Containing block for absolute positioning
Containing block for absolute positioning
10.2 Content width: the 'width' property
Width of non-replaced inline element should be the same as its content
Content width of a non-replaced inline element is that of the rendered content.
Calculating percentage based width off of the parent container
Percentage is calculated with respect to the width of the generated boxes containing block.
Calculating widths for absolutely positioned elements
Absolutely positioned elements whose containing block is based on a block-level element, the percentage is calculated with respect to the width of the padding box of that element.
Scaling replaced elements with a width specified can scale the image G
Replaced elements width may be scaled by the user agent when the value of the property is not 'auto'.
Width of containing block is determined by with of child A
The containing block's width depends on this element's width because the resulting layout has not been defined in CSS2.1.
Horizontal Formatting AG
margin-right
margin-left
margin AG
padding-right
width G
width G
width G
float G
10.3 Calculating widths and margins
10.3.1 Inline, non-replaced elements
Inline non-replaced elements with 'auto' value for 'left', 'right', and 'margin-left' A
Computed value of 'auto' for 'left', 'right', and 'margin-left' becomes a used value of '0'.
Inline non-replaced elements with 'auto' value for 'left', 'right', and 'margin-right' A
Computed value of 'auto' for 'left', 'right', and 'margin-right' becomes a used value of '0'.
10.3.2 Inline, replaced elements
Inline replaced elements and 'auto' specified for 'margin-left', 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on inline replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Inline replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Inline replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
10.3.3 Block-level, non-replaced elements in normal flow
Solving for width of block-level non-replaced elements in normal flow
The equation; 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' is equal the width of containing block.
Solving for width of block-level non-replaced elements in normal flow when 'width' is 'auto'
When width is auto and the combination of border widths, padding widths, scrollbar widths, width, and non 'auto' margin widths are larger than the width of the containing block, the margin widths are treated as 0.
Solving over-constrained situation for block-level non-replaced elements in normal flow and direction is left-to-right
When direction is left-to-right, margin-right is ignored in an over-constrained situation.
Solving over-constrained situation for block-level non-replaced elements in normal flow and direction is right-to-left
When direction is right-to-left, margin-left is ignored in an over-constrained situation.
Box centering with 'margin-left' and 'margin-right' set to auto A
When 'margin-left' and 'margin-right' are set to auto and the element has a 'width' then the box will be centered.
Horizontal Formatting AG
10.3.4 Block-level, replaced elements in normal flow
Block replaced elements and 'auto' specified for 'margin-left', 'margin-right' and intrinsic width AG
Computed value of 'auto' for 'margin-left' or margin-right' on block replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Block replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width AG
Percentage intrinsic widths are evaluated against the containing block's width.
Block replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width that cannot be resolved AG
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Replaced Elements AG
Replaced Elements G
Replaced Elements G
10.3.5 Floating, non-replaced elements
Floating non-replaced elements with 'auto' left margin
If 'margin-left' is computed as 'auto' its used value is '0'.
Floating non-replaced elements with specified left margin
If 'margin-left' is not computed as 'auto' its used value is as specified.
Floating non-replaced elements with 'auto' right margin
If 'margin-right' is computed as 'auto' its used value is '0'.
Floating non-replaced elements with specified right margin
If 'margin-right' is not computed as 'auto' its used value is as specified.
Floating non-replaced elements with left and right margins as 'auto'
If both 'margin-left' and margin-right' are computed as 'auto' their used value is as '0'.
Floating non-replaced elements with 'auto' width A
If 'width' computes to 'auto' then the used value of 'width' is 'shrink-to-fit'.
10.3.6 Floating, replaced elements
Floated replaced elements with 'auto' left margin G
If 'margin-left' is computed as 'auto' its used value is '0'.
Floated replaced elements with specified left margin G
If 'margin-left' is not computed as 'auto' its used value is as specified.
Floated replaced elements with 'auto' right margin G
If 'margin-right' is computed as 'auto' its used value is '0'.
Floated replaced elements with specified right margin G
If 'margin-right' is not computed as 'auto' its used value is as specified.
Floated replaced elements with left and right margins as 'auto' G
If both 'margin-left' and margin-right' are computed as 'auto' their used value is as '0'.
Floated replaced elements and 'auto' specified for 'margin-left', 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on floated replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Floated replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Floated replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
10.3.7 Absolutely positioned, non-replaced elements
Solving for 'right' on absolutely positioned non-replaced elements A
When direction is left-to-right and 'left', 'width' and 'right' are 'auto', the width becomes shrink-to-fit and then solve for 'right'.
Solving for 'left' on absolutely positioned non-replaced elements A
When direction is right-to-left and 'left', 'width' and 'right' are 'auto', the width becomes shrink-to-fit and then solve for 'left'.
Absolutely positioned non-replaced elements with 'margin-left' and 'margin-right' set to 'auto' A
When 'left', 'width' and 'right' are not 'auto', the width becomes shrink-to-fit and set 'margin-left' and 'margin-right' to equal values.
Absolutely positioned non-replaced elements when both 'margin-left' and 'margin-right' are set to 'auto' A
When direction is left-to-right and 'left', 'width' and 'right' are not 'auto', the width becomes shrink-to-fit and then solve for 'margin-right'.
Absolutely positioned non-replaced element when only 'margin-right' is 'auto' A
When direction is left-to-right and 'left', 'width' and 'right' are not 'auto', the width becomes shrink-to-fit and then solve for 'margin-right'.
Solved for 'left' when absolutely positioned non-replaced elements has 'left' and 'width' as 'auto' A
When 'left' and 'width' are 'auto' and 'right' is not 'auto' element solves for 'left'.
Absolutely positioned non-replaced elements when 'left' and 'right' are 'auto', 'width' is not 'auto' and 'direction' is left-to-right A
When 'direction' is left-to-right and 'left' and 'right' are 'auto' and 'width' is not 'auto', solve for 'right'.
Absolutely positioned non-replaced elements when 'left' and 'right' are 'auto', 'width' is not 'auto' and 'direction' is right-to-left A
When 'direction' is right-to-left and 'left' and 'right' are 'auto' and 'width' is not 'auto', solve for 'left'.
Solved for 'right' when absolutely positioned non-replaced elements has 'right' and 'width' as 'auto' A
When 'right' and 'width' are 'auto' and 'left' is not 'auto' element solves for 'right'.
Solved for 'width' when absolutely positioned non-replaced elements has 'left' and 'right' not set to 'auto'
When 'width' is 'auto' and 'left' and 'right' are not 'auto' element solves for 'width'.
Solved for 'right' when absolutely positioned non-replaced elements has 'left' and 'width' not set to 'auto' A
When 'right' is 'auto' and 'width' and 'left' are not 'auto' element solves for 'right'.
10.3.8 Absolutely positioned, replaced elements
Absolute replaced elements and 'auto' specified for 'margin-left', 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as right-to-left, 'auto' specified for 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as left-to-right, intrinsic width and over-constrained situation G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as left-to-right, percentage intrinsic width and over-constrained situation G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as left-to-right, percentage intrinsic width that cannot be resolved and is in an over-constrained situation G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
Absolute replaced elements with 'direction' as right-to-left, intrinsic width and over-constrained situation G
Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Absolute replaced elements with 'direction' as right-to-left, percentage intrinsic width and over-constrained situation G
Percentage intrinsic widths are evaluated against the containing block's width.
Absolute replaced elements with 'direction' as right-to-left, percentage intrinsic width that cannot be resolved and is in an over-constrained situation G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
10.3.9 'Inline-block', non-replaced elements in normal flow
Inline-block non-replaced elements shrink-to-fit A
If 'width' is 'auto' then 'inline-block' elements shrink-to-fit.
Inline-block non-replaced elements with 'margin-left' and 'margin-right' set to 'auto' A
When 'margin-left' and 'margin-right' are set to 'auto' the used value becomes '0'.
10.3.10 'Inline-block', replaced elements in normal flow
Inline-block replaced elements and 'auto' specified for 'margin-left', 'margin-right' and intrinsic width G
Computed value of 'auto' for 'margin-left' or margin-right' on inline-block replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'.
Inline-block replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width G
Percentage intrinsic widths are evaluated against the containing block's width.
Inline-block replaced elements and 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width that cannot be resolved G
Percentage intrinsic widths are evaluated against the containing block's width unless the containing block width depends on the element.
10.4 Minimum and maximum widths: 'min-width' and 'max-width'
Max-Width applied to none
Max-Width can be applied to none elements.
Using percentages with 'max-width' relative to the containing block
The percentage is calculated in relation to the containing block.
Percentage based value for 'max-width' contained by box with a negative 'width'
If the containing block's width is negative, the used value is zero.
Max-width in constrained situation
If the containing block's width depends on this element's width, then the resulting layout is undefined.
Min-Width applied to none
Min-Width can be applied to none elements.
Using percentages with 'min-width' relative to the containing block
The percentage is calculated in relation to the containing block.
Percentage based value for 'min-width' contained by box with a negative 'width'
If the containing block's width is negative, the used value is zero.
Using 'min-width' with 'width' dependent on the containing block
If the containing block's width depends on this element's width, then the resulting layout is undefined.
Replaced Elements AG
Replaced Elements AG
height G
10.5 Content height: the 'height' property
Resolving container heights when they contain absolutely positioned elements with percentage based heights
The 'height' of the containing block of an absolutely positioned element is independent of the size of the element itself.
page-break-inside:auto P
The 'auto' value of the 'page-break-inside' property neither forces nor forbids a page break inside the box.
Paged Media Height (percent) P
For HTML documents in paged media, when the HTML and BODY elements have heights of 100%, a percentage height on a child of BODY is relative to the page area height.
height G
height G
height G
10.6 Calculating heights and margins
10.6.1 Inline, non-replaced elements
Inline non-replaced elements and padding A
The padding starts at the top and bottom of the content area not the 'line-height'.
Inline non-replaced elements and border A
The border starts at the top and bottom of the content area not the 'line-height'.
Inline Elements
10.6.2 Inline replaced elements, block-level replaced elements in normal flow, 'inline-block' replaced elements in normal flow and floating replaced elements
Block replaced elements with 'margin-top' and 'margin-bottom' as 'auto' G
A block replaced elements' used value of 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.
Block replaced elements relying on intrinsic height dimensions G
The 'height' is the intrinsic height when an block replaced element with and intrinsic height has a 'height' and 'width' computed as 'auto'.
Block replaced elements with intrinsic ratios and 'height' set to 'auto' G
The 'height' is the used width divided by the ratio when an block replaced element has an intrinsic ratio, 'height' is set to 'auto' and 'width' is specified.
Block replaced elements without intrinsic ratios and 'height' set to 'auto'
For block replaced elements the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Block replaced elements with percentage based intrinsic height
A block replaced elements with a percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Block replaced elements with percentage based intrinsic height that cannot be resolved
A block replaced elements with a percentage height that cannot be resolved has no intrinsic height.
Floated replaced elements with 'margin-top' and 'margin-bottom' as 'auto' G
A floated replaced elements' used value of 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.
Floated replaced elements relying on intrinsic height dimensions G
The 'height' is the intrinsic height when an floated replaced element with and intrinsic height has a 'height' and 'width' computed as 'auto'.
Floating replaced elements with intrinsic ratios and 'height' set to 'auto' G
The 'height' is the used width divided by the ratio when an floated replaced element has an intrinsic ratio, 'height' is set to 'auto' and 'width' is specified.
Floated replaced elements without intrinsic ratios and 'height' set to 'auto'
For floated replaced elements the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Floated replaced elements with percentage based intrinsic height
A floated replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Floated replaced elements with percentage based intrinsic height that cannot be resolved
A floated replaced elements with a percentage height that cannot be resolved has no intrinsic height.
Inline-block replaced elements with 'margin-top' and 'margin-bottom' as 'auto' G
An inline-block replaced elements' used value of 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.
Inline-block replaced elements relying on intrinsic height dimensions G
The 'height' is the intrinsic height when an inline-block replaced element with and intrinsic height has a 'height' and 'width' computed as 'auto'.
Inline-block replaced elements with intrinsic ratios and 'height' set to 'auto' G
The 'height' is the used width divided by the ratio when an inline-block replaced element has an intrinsic ratio, 'height' is set to 'auto' and 'width' is specified.
Inline-block replaced elements without intrinsic ratios and 'height' set to 'auto'
For inline-block replaced elements the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Inline-block replaced elements with percentage based intrinsic height
An inline-block replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Inline-block replaced elements with percentage based intrinsic height that cannot be resolved
An inline-block replaced elements with a percentage height that cannot be resolved has no intrinsic height.
Inline replaced elements with 'margin-top' and 'margin-bottom' as 'auto' G
An inline replaced elements' used value of 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.
Inline replaced elements relying on intrinsic height dimensions G
The 'height' is the intrinsic height when an inline replaced element with and intrinsic height has a 'height' and 'width' computed as 'auto'.
Inline replaced elements with intrinsic ratios and 'height' set to 'auto' G
The 'height' is the used width divided by the ratio when an inline replaced element has an intrinsic ratio, 'height' is set to 'auto' and 'width' is specified.
Inline replaced elements without intrinsic ratios and 'height' set to 'auto'
For inline replaced elements the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Inline replaced elements with percentage based intrinsic height
An inline replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Inline replaced elements with percentage based intrinsic height that cannot be resolved
An inline replaced elements with a percentage height that cannot be resolved has no intrinsic height.
Replaced Elements AG
Replaced Elements AG
Replaced Elements G
Replaced Elements G
10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'
Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible' and margins top and bottom are 'auto'
The margin top and bottom used values are '0' for block-level non-replaced elements in normal flow when 'overflow' computes to 'visible' and margin top and bottom both are 'auto'.
Block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible'
The margin top and bottom used values are '0' for block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and margin top and bottom both are 'auto'.
Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible' and 'height' is 'auto'
The 'height' is the 'height' of the child block box when a block-level non-replaced element is in normal flow and 'overflow' computes to 'visible'.
Block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and 'height' is 'auto'
The 'height' is the 'height' of the child block box when a block-level non-replaced element is in normal flow and 'overflow' does not compute to 'visible'.
Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible' and 'height' is 'auto' adjust based on the line box height A
The 'height' is the distance from the topmost to the bottommost line box when a block-level non-replaced element is in normal flow and 'overflow' computes to 'visible'.
Block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and 'height' is 'auto' adjust based on the line box height A
The 'height' is the distance from the topmost to the bottommost line box when a block-level non-replaced element is in normal flow and 'overflow' does not compute to 'visible'.
Height determination for block-level non-replaced elements in normal flow when 'overflow' computes to 'visible' and elements' margins collapse
The 'height' is the distance between the top border edge of the top most block-level child box that doesn't have margins collapsed through it, and the bottom border edge of the bottommost block-level child that doesn't have margins collapsed through it. When a block-level non-replaced element is in normal flow, 'overflow' computes to 'visible' and the 'height' is 'auto'.
Height determination for block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and elements' margins collapse
The 'height' is the distance between the top border edge of the top most block-level child box that doesn't have margins collapsed, and the bottom border edge of the bottommost block-level child that doesn't have margins collapsed. When a block-level non-replaced element is in normal flow, 'overflow' does not compute to 'visible' but has been propagated to the viewport and the 'height' is 'auto'.
Height determination for block-level non-replaced elements in normal flow when 'overflow' computes to 'visible' and elements' margins do not collapse
When a block-level non-replaced element is in normal flow, 'overflow' computes to 'visible', the 'height' is 'auto' and top and bottom margins do not collapse. The 'height' is the sized from the top of the topmost margin edge of the content to the bottom of the bottom most margin edge of the content.
Height determination for block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and elements' margins do not collapse
When a block-level non-replaced element is in normal flow, 'overflow' does not compute to 'visible', the 'height' is 'auto' and top and bottom margins do not collapse. The 'height' is the sized from the top of the topmost margin edge of the content to the bottom of the bottom most margin edge of the content.
Floated children are ignored for 'height' on block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'
A floated child element is not considered when sizing the 'height' of a block-level non-replaced element is in normal flow.
Floated children are ignored for 'height' on block-level non-replaced elements in normal flow when 'overflow' does not computes to 'visible'
A floated child element is not considered when sizing the 'height' of a block-level non-replaced element is in normal flow.
An absolutely positioned child elements' 'height' is ignored for block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'
An absolutely positioned child element is not considered when sizing the 'height' of a block-level non-replaced element is in normal flow.
An absolutely positioned child elements' 'height' is ignored for block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible'
An absolutely positioned child element is not considered when sizing the 'height' of a block-level non-replaced element is in normal flow.
A relative positioned child elements' offset is ignored for 'height' on a block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'
A relative positioned child elements' offset is not considered when sizing the 'height' of a block-level non-replaced element is in normal flow.
A relative positioned child elements' offset is ignored for 'height' on a block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible'
A relative positioned child elements' offset is not considered when sizing the 'height' of a block-level non-replaced element is in normal flow.
float AG
float
10.6.4 Absolutely positioned, non-replaced elements
Absolutely positioned, non-replaced elements, static position of fixed element
The calculation of static position is based on initial containing block when there is a fixed positioned element.
Absolutely positioned, non-replaced elements, shrinks-to-fit height A
The used value for absolutely positioned elements shrinks-to-fit height.
Absolutely positioned, non-replaced elements, vertical centering
An element is vertically centered when both 'margin-top' and 'margin-bottom' have equal values, when 'top', 'bottom' and 'height' are all are not auto and 'margin-top' and 'margin-bottom' are both 'auto'.
Absolutely positioned, non-replaced elements, 'margin-top' set to 'auto'
When 'top', 'bottom' and 'height' are all are not 'auto', 'margin-top' is 'auto' and 'margin-bottom' is not 'auto'. Then 'margin-top' becomes the remainder of the height of the containing box.
Absolutely positioned, non-replaced elements, 'margin-bottom' set to 'auto'
When 'top', 'bottom' and 'height' are all are not 'auto', 'margin-top' is not 'auto' and 'margin-bottom' is 'auto'. Then 'margin-bottom' becomes the remainder of the height of the containing box.
Absolutely positioned, non-replaced elements, over-constrained
The 'bottom' value is ignored and the equation solves for the bottom value, when the values for 'top', 'bottom', 'height', 'margin-top', 'margin-bottom' add up to more than the containing blocks height.
Absolutely positioned, non-replaced elements, shrink-to-fit solve for top A
Verify that height is based on the overall height of the content, 'margin-top', 'auto' is set to '0' and solve for 'top', when 'top' and 'height' are both 'auto' and 'bottom' is not 'auto'.
Absolutely positioned, non-replaced elements, 'top' set to static position
When 'top' is set to the static position and any 'auto' values for top and bottom margin are set to '0', when 'top' and 'bottom' are 'auto' and 'height' is not 'auto'.
Absolutely positioned, non-replaced elements, height is shrink-to-fit A
The 'height' is based on the content height, 'auto' values for 'margin-top' and 'margin-bottom' are set to '0' when 'height' and 'bottom' are 'auto' and 'top' is not 'auto'.
Absolutely positioned, non-replaced elements, 'margin-top' and 'margin-bottom' set to '0'
The 'auto' values for 'margin-top' and 'margin-bottom' are set to '0', when 'top', 'height' and 'bottom' are all not auto.
Absolutely positioned, non-replaced elements, 'height' based on 'top' and 'bottom' positions
The 'auto' values on 'margin-top', 'margin-bottom' are set to '0' and the 'height' is the remaining space between the 'top' and 'bottom' positions, when 'height' is 'auto' and 'top' and 'bottom' are both not 'auto'.
Absolutely positioned, non-replaced elements, solve for 'bottom'
When 'margin-top' and 'margin-bottom' are set to '0' the 'bottom' value resolves to the remaining space within the containing block.
Max-height on absolutely positioned, non-replaced elements, static position of fixed element
The calculation of static position is based on initial containing block when there is a fixed positioned element.
Max-height on absolutely positioned, non-replaced elements, shrinks-to-fit height A
The used value for absolutely positioned elements shrinks-to-fit height.
Max-height on absolutely positioned, non-replaced elements, 'margin-bottom' set to 'auto'
When 'top', 'bottom' and 'height' are all are not 'auto', 'margin-top' is not 'auto' and 'margin-bottom' is 'auto'. Then 'margin-bottom' becomes the remainder of the height of the containing box.
Max-height on absolutely positioned, non-replaced elements, over-constrained
The 'bottom' value is ignored and the equation solves for the bottom value, when the values for 'top', 'bottom', 'height', 'margin-top', 'margin-bottom' add up to more than the containing blocks height.
Max-height on absolutely positioned, non-replaced elements, shrink-to-fit solve for top A
The height is based on the overall height of the content, 'margin-top', 'auto' is set to '0' and solve for 'top', when 'top' and 'height' are both 'auto' and 'bottom' is not 'auto'.
Max-height on absolutely positioned, non-replaced elements, 'top' set to static position
When 'top' is set to the static position and any 'auto' values for top and bottom margin are set to '0', when 'top' and 'bottom' are 'auto' and 'height' is not 'auto'.
Max-height on absolutely positioned, non-replaced elements, height is shrink-to-fit A
The 'height' is based on the content height, 'auto' values for 'margin-top' and 'margin-bottom' are set to '0' when 'height' and 'bottom' are 'auto' and 'top' is not 'auto'.
Max-height on absolutely positioned, non-replaced elements, solve for 'bottom'
When 'margin-top' and 'margin-bottom' are set to '0' the 'bottom' value resolves to the remaining space within the containing block.
10.6.5 Absolutely positioned, replaced elements
Absolute replaced elements with 'margin-top' and 'margin-bottom' as 'auto' G
An absolutely positioned replaced elements' used value of 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.
Absolute replaced elements relying on intrinsic height dimensions G
The 'height' is the intrinsic height when an absolutely positioned replaced element with and intrinsic height has a 'height' and 'width' computed as 'auto'.
Absolute replaced elements with intrinsic ratios and 'height' set to 'auto' G
The 'height' is the used width divided by the ratio when an absolutely positioned replaced element has an intrinsic ratio, 'height' is set to 'auto' and 'width' is specified.
Absolute replaced elements without intrinsic ratios and 'height' set to 'auto'
For an absolutely positioned replaced element the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Absolute replaced elements with percentage based intrinsic height
An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Absolute replaced elements with percentage based intrinsic height that cannot be resolved
An absolutely positioned replaced element with a percentage height that cannot be resolved has no intrinsic height.
Absolute replaced elements with 'margin-top', 'margin-bottom' and 'bottom' as 'auto' G
An absolutely positioned replaced elements' used value of 'bottom', 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.
Absolute replaced elements relying on intrinsic height dimensions and 'bottom' set to 'auto' G
The 'height' is the intrinsic height when an absolutely positioned replaced element with and intrinsic height has a 'height', 'width' and 'bottom' computed as 'auto'.
Absolute replaced elements with intrinsic ratios, 'height' and 'bottom' set to 'auto' G
The 'height' is the used width divided by the ratio when an absolutely positioned replaced element has an intrinsic ratio, 'height' and 'bottom' are set to 'auto' and 'width' is specified.
Absolute replaced elements without intrinsic ratios, 'height' and 'bottom' set to 'auto'
For an absolutely positioned replaced element the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Absolute replaced elements with percentage based intrinsic height and 'bottom' set to 'auto'
An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Absolute replaced elements with percentage based intrinsic height that cannot be resolved and 'top' specified
An absolutely positioned replaced element with a percentage height that cannot be resolved has no intrinsic height.
Absolute replaced elements relying on intrinsic height dimensions and 'top', 'bottom' are not 'auto' G
The 'height' is the intrinsic height when an absolutely positioned replaced element with and intrinsic height has a 'height', 'width' computed as 'auto' and 'top', 'bottom' are not 'auto'.
Absolute replaced elements with intrinsic ratios, 'height' set to 'auto' and 'top', 'bottom' are not 'auto' G
The 'height' is the used width divided by the ratio when an absolutely positioned replaced element has an intrinsic ratio, 'height' is set to 'auto', 'width' is specified and 'top', 'bottom' are not 'auto'.
Absolute replaced elements without intrinsic ratios, 'height' set to 'auto' and 'top', 'bottom' are not 'auto'
For an absolutely positioned replaced element the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Absolute replaced elements with percentage based intrinsic height set to 'auto' and 'top', 'bottom' are not 'auto'
An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Absolute replaced elements with percentage based intrinsic height that cannot be resolved where 'top' and 'bottom' are not 'auto'
An absolutely positioned replaced element with a percentage height that cannot be resolved has no intrinsic height.
Absolute replaced elements with 'margin-bottom' as 'auto' and 'top', 'bottom', 'margin-top' are not 'auto' G
An absolutely positioned replaced element with only one value as 'auto' solves for that value (margin-bottom).
Absolute replaced elements relying on intrinsic height dimensions and 'top', 'bottom', 'margin-top' are not 'auto' G
The 'height' is the intrinsic height when an absolutely positioned replaced element with and intrinsic height has a 'height', 'width' computed as 'auto' and 'top', 'bottom' are not 'auto'.
Absolute replaced elements with intrinsic ratios, 'height' set to 'auto' and 'top', 'bottom', 'margin-top' are not 'auto' G
The 'height' is the used width divided by the ratio when an absolutely positioned replaced element has an intrinsic ratio, 'height' is set to 'auto', 'width' is specified and 'top', 'bottom' are not 'auto'.
Absolute replaced elements without intrinsic ratios, 'height' set to 'auto' and 'top', 'bottom', 'margin-top' are not 'auto'
For an absolutely positioned replaced element the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width.
Absolute replaced elements with percentage based intrinsic height set to 'auto' and 'top', 'bottom', 'margin-top' are not 'auto'
An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Absolute replaced elements with percentage based intrinsic height that cannot be resolved where 'top', 'bottom', 'margin-top' are not 'auto'
An absolutely positioned replaced element with a percentage height that cannot be resolved has no intrinsic height.
Absolute replaced elements with over-constrained values G
An absolutely positioned replaced element with over-constrained values solves for 'bottom'.
Absolute replaced elements relying on intrinsic height dimensions and over-constrained values G
The 'height' is the intrinsic height when an absolutely positioned replaced element with and intrinsic height with over-constrained values solves for 'bottom'.
Absolute replaced elements with intrinsic ratios, 'height' set to 'auto' and over-constrained values G
The 'height' is the used width divided by the ratio when an absolutely positioned replaced element has an intrinsic ratio, 'height' is set to 'auto', with over-constrained values solves for 'bottom'.
Absolute replaced elements without intrinsic ratios, 'height' set to 'auto' and over-constrained values
For an absolutely positioned replaced element the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width. And with over-constrained values element solves for 'bottom'.
Absolute replaced elements with percentage based intrinsic height set to 'auto' and over-constrained values
An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block height when percentage is explicitly specified.
Absolute replaced elements with percentage based intrinsic height that cannot be resolved and there are over-constrained values
An absolutely positioned replaced element with a percentage height that cannot be resolved has no intrinsic height.
10.6.6 Complicated cases
Floated non-replaced element with 'margin-top', margin-bottom' set to 'auto' and 'height' relying on the descendants
If 'height' is 'auto' on an floated non-replaced element then the 'height' depends on the descendants.
Inline-block non-replaced element with 'margin-top', margin-bottom' set to 'auto' and 'height' relying on the descendants
If 'height' is 'auto' on an inline-block non-replaced element then the 'height' depends on the descendants.
Inline-block non-replaced elements' margin box is used for the height of the line box
Inline-block non-replaced elements use the margin box for sizing the height of the line box.
float G
10.6.7 'Auto' heights for block formatting context roots
10.7 Minimum and maximum heights: 'min-height' and 'max-height'
Max-Height applied to none
Max-Height can be applied to none elements.
Max-height percentage is based on containing block
A percentage for 'max-height' is calculated with respect to the 'height' of the generated boxes containing block.
Percentage 'max-height' with no 'height' on containing block
When the 'height' of the containing block is not specified and the element is not absolutely positioned the percentage is treated as '0' for 'min-height' and 'none' for 'max-height'.
Min-height percentage is based on containing block
A percentage for 'min-height' is calculated with respect to the 'height' of the generated boxes containing block.
Percentage 'min-height' with no 'height' on containing block
When the 'height' of the containing block is not specified and the element is not absolutely positioned the percentage is treated as '0' for 'min-height' and 'none' for 'max-height'.
10.8 Line height calculations: the 'line-height' and 'vertical-align' properties
Line-Height applied to 'none' font
Line-Height can be applied to 'none' level elements.
Leading and half leading line heights leads to space above and below
Line-height can be different from the content area so there is space above and below.
Replaced Elements AG
The Height of Lines AG
The Height of Lines AG
The Height of Lines AG
The Height of Lines AG
10.8.1 Leading and half-leading
Leading and half leading line heights A
Line-height can be different from the content area so space is above and below.
CSS Test Suite: Table baseline and caption
A table caption does not set the baseline for a table.
CSS Test Suite: Inline-table baseline and caption
A table caption does not set the baseline for an inline-table.
Inline Elements
font
font
font
font
font
font
font
font
font
font
vertical-align AG
vertical-align AG
vertical-align AGI
vertical-align AGI
vertical-align AGI
line-height
line-height AG
line-height AG
line-height AG
line-height AG
line-height