Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
V0092:
-
CSS assumes that every font has font metrics that specify a characteristic height above the baseline and a depth below it. In this section we use A to mean that height (for a given font at a given size) and D the depth. We also define AD = A + D, the distance from the top to the bottom. (See the note below for how to find A and D for TrueType and OpenType fonts.) Note that these are metrics of the font as a whole and need not correspond to the ascender and descender of any individual glyph. User agent must align the glyphs in a non-replaced inline box to each other by their relevant baselines, and to nested inline boxes according to 'vertical- align'. Then, for each glyph, determine the A and D. Note that glyphs in a single element may come from different fonts and thus need not all have the same A and D. If the inline box contains no glyphs at all, it is considered to contain a strut (an invisible glyph of zero width) with the A and D of the element's first available font.
Quirks Mode and IE7 Mode (All Versions)
When the value of line-height is less than the content height, the portion of the font that would pass below the bottom edge of the content box is clipped and does not bleed outside of the box.
IE7 Mode (All Versions)
If a width, max-width, or min-width property is assigned to the inline box, the portion of the font that would pass above the top edge of the content box is clipped and does not bleed outside the box.
V0093:
-
‘line-height' Value: normal | <number> | <length> | <percentage> | inherit Initial: normal Applies to: all elements Inherited: yes Percentages: refer to the font size of the element itself Media: visual Computed value: for <length> and <percentage> the absolute value; otherwise as specified
Quirks Mode and IE7 Mode (All Versions)
The inherit
value of the line-height
property is not supported.
V0094:
-
On a block container element whose content is composed of inline-level elements, 'line-height' specifies the minimal height of line boxes within the element. The minimum height consists of a minimum height above the baseline and a minimum depth below it, exactly as if each line box starts with a zero-width inline box with the element's font and line height properties. We call that imaginary box a "strut." (The name is inspired by TeX.)
IE8 Mode and IE9 Mode (All Versions)
In almost standards mode, line-height does not define a minimal line height for inline content in block-level, table-cell, table-caption, or inline-block elements.
V0095:
-
On an inline-level element, 'line-height' specifies the height that is used in the calculation of the line box height (except for inline replaced elements, where the height of the box is given by the 'height' property).
IE8 Mode and IE9 Mode (All Versions)
In almost standards mode, the specified line-height has no effect on line box height calculation.
V0096:
-
The following values only have meaning with respect to a parent inline element, or to the strut of a parent block container element.
Quirks Mode and IE7 Mode (All Versions)
If a box (e.g. empty inline-block or <img/> element) does not have a baseline, the element’s bottom margin edge is aligned with the parent’s bottom edge instead of with the parent’s baseline.
V0097:
-
Middle Align the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent.
Quirks Mode and IE7 Mode (All Versions)
The font ex height is not correctly calculated. It is assigned a value of 0.5em.
V0238:
-
Although margins, borders, and padding of non-replaced elements do not enter into the line box calculation, they are still rendered around inline boxes. This means that if the height specified by 'line-height' is less than the content height of contained boxes, backgrounds and colors of padding and borders may "bleed" into adjoining line boxes. User agents should render the boxes in document order. This will cause the borders on subsequent lines to paint over the borders and text of previous lines.
Quirks Mode and IE7 Mode (All Versions)
The following clarifications apply:
Backgrounds, padding colors, and borders are clipped to the bottom of the content box.
Backgrounds, padding colors, and borders are also clipped to the top of the content box if the value of the box is anything other than auto.
V0239:
-
<length> The specified length is used in the calculation of the line box height. Negative values are illegal.
Quirks Mode and IE7 Mode (All Versions)
The following clarifications apply:
When the value of the line-height property is less than the content height the portion of the font that would pass below the bottom edge of the content box is clipped and does not appear outside of the box.
When the width of the element is computed to a value other than auto the content is clipped at the top edge of the content box.
V0240:
-
<number> The used value of the property is this number multiplied by the element's font size. Negative values are illegal. The computed value is the same as the specified value.
Quirks Mode and IE7 Mode (All Versions)
The following clarifications apply:
When the value of the line-height property is less than the content height, the portion of the font that would pass below the bottom edge of the content box is clipped and does not appear outside of the box.
When the width of the element is computed to a value other than
auto
, the content is clipped at the top edge of the content box.
V0241:
-
<percentage> The computed value of the property is this percentage multiplied by the element's computed font size. Negative values are illegal.
Quirks Mode and IE7 Mode (All Versions)
The following clarifications apply:
When the value of the line-height property is less than the content height the portion of the font that would pass below the bottom edge of the content box is clipped and does not appear outside of the box.
When the width of the element is computed to a value other than auto the content is clipped at the top edge of the content box.
V0242:
-
‘vertical-align’ Value: baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit Initial: baseline Applies to: inline-level and 'table-cell' elements Inherited: no Percentages: refer to the ‘line-height’ of the element itself Media: visual Computed value: for <percentage> and <length> the absolute length, otherwise as specified This property affects the vertical positioning inside a line box of the boxes generated by an inline-level element.
Quirks Mode and IE7 Mode (All Versions)
The vertical-align property of the table-cell elements is not supported.
V0243:
-
The following values align the element relative to the line box. Since the element may have children aligned relative to it (which in turn may have descendants aligned relative to them), these values use the bounds of the aligned subtree. The aligned subtree of an inline element contains that element and the aligned subtrees of all children inline elements whose computed 'vertical-align' value is not 'top' or 'bottom'. The top of the aligned subtree is the highest of the tops of the boxes in the subtree, and the bottom is analogous. top Align the top of the aligned subtree with the top of the line box. bottom Align the bottom of the aligned subtree with the bottom of the line box.
Quirks Mode and IE7 Mode (All Versions)
The vertical-align property of the table-cell elements is not supported.
V0244:
-
The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge.
Quirks Mode and IE7 Mode (All Versions)
When the overflow property has a computed value other
than visible
the hidden element is not used to
calculate the baseline.