In the case where ICB has a 'height' of 'auto' (the default), then for child absolutely positioned elements the viewport height should be used as the containing block height.
9.3.2 Box offsets
Add a new value 'static-position' that applies to the 'top',
'right', and 'left' properties and is defined as follows:
static-position
-
Only applies to absolutely positioned elements.
-
For 'left' use the distance from the left
edge of the containing block to the left margin edge of a hypothetical
box that would have been the first box of the element if its 'position'
property had been 'static'. The value is negative if the hypothetical box
is to the left of the containing block.
-
For 'right' use the distance from the right
edge of the containing block to the right margin edge of the same hypothetical
box as above. The value is positive if the hypothetical box is to the left
of the containing block's edge.
-
For 'top' use the distance from the top edge
of the containing block to the top margin edge of a hypothetical box that
would have been the first box of the element if its 'position' property
had been 'static'. The value is negative if the hypothetical box is above
the containing block.
10.3.7 Absolutely positioned,
replaced and non-replaced elements
The
constraint that determines the computed values for these elements is:
'left' + 'margin-left' +
'border-left-width' + 'padding-left' + 'width' + 'padding-right' +
'border-right-width' + 'margin-right' + 'right' = width of containing
block
If all three of 'left',
'width', and 'right' are 'auto': if 'direction' is 'ltr' treat 'left'
like 'static-position' and apply rule number three below; otherwise, treat 'right' like
'static-position' and apply rule number one below..
If none of the three are 'auto': If both
'margin-left' and 'margin-right' are 'auto', solve the equation under the extra
constraint that the two margins get equal values. If one of 'margin-left' or
'margin-right' is 'auto', solve the equation for that value. If the values are
over-constrained, ignore the value for 'left' (in case 'direction' is 'rtl') or
'right' (in case 'direction' is 'ltr') and solve for that value.
Otherwise, set 'auto' values for 'margin-left' and
'margin-right' to 0, and pick the one of the following six rules that
applies.
- 'left' and 'width' are 'auto' and 'right' is
not 'auto', then for a non-replaced element the width is
shrink-to-fit and for a replaced element substitute the intrinsic width. Then
solve for 'left'
- 'left' and 'right' are 'auto' and 'width' is
not 'auto', then if 'direction' is 'ltr' treat 'left' like 'static-position',
otherwise treat 'right' like 'static-position'. Then solve for 'left' (if
'direction is 'rtl') or 'right' (if 'direction' is 'ltr').
- 'width' and 'right' are
'auto' and 'left' is not 'auto', then for a non-replaced element
the width is shrink-to-fit and for a replaced element
substitute the intrinsic width. Then solve for 'right'
- 'left' is 'auto', 'width' and 'right' are not
'auto', then solve for 'left'
- 'width' is 'auto', 'left' and 'right' are not
'auto', then solve for 'width'
- 'right' is 'auto', 'left' and 'width' are not
'auto', then solve for 'right'
10.6.4 Absolutely positioned, replaced and
non-replaced elements
For absolutely
positioned elements, the vertical dimensions must satisfy this
constraint:
'top' + 'margin-top' +
'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' +
'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing
block
If all three of 'top',
'height', and 'bottom' are 'auto', treat 'top' like 'static-position' and apply
rule number three below.
If none of the three are 'auto': If both
'margin-top' and 'margin-bottom' are 'auto', solve the equation under the extra
constraint that the two margins get equal values. If one of 'margin-top' or
'margin-bottom' is 'auto', solve the equation for that value. If the values are
over-constrained, ignore the value for 'bottom' and solve for that value.
Otherwise, set 'auto' values for 'margin-top' and
'margin-bottom' to 0, and pick the one of the following six rules that
applies.
- 'top' and 'height' are 'auto' and 'bottom' is
not 'auto', then for a replaced element substitute the intrinsic height and
for a non-replaced element the height is based on the content, and solve for
'top'
- 'top' and 'bottom' are 'auto' and 'height' is
not 'auto', then treat 'top' like 'static-position', and solve for
'bottom'
- 'height' and 'bottom' are
'auto' and 'top' is not 'auto', then for a replaced element substitute the
intrinsic height and for a non-replaced element the height is based on the
content, and solve for 'bottom'
- 'top' is 'auto', 'height' and 'bottom' are not
'auto', then solve for 'top'
- 'height' is 'auto', 'top' and 'bottom' are not
'auto', then solve for 'height'
- 'bottom' is 'auto', 'top' and 'height' are not
'auto', then solve for 'bottom'