CSS 2.1 WD and containing blocks

I've had a brief scan through the new CSS 2.1 Working Draft and most of
it seems reasonable. However, much to my disappointment, the issue of the
height of the initial containing block has still not been consistently
resolved.

9.1.2 states that the initial containing block is generated by the root
element, defining an 'auto' width on the root element to mean the width of
the viewport and an 'auto' height to mean the height of the in-flow child
content (as normal box model).

10.1 however describes the initial CB as 'UA-dependent', implying it is
the CB referred to as "the containing block in which the root element lives",
a definition that is of little use as its size is undefined and never used.

I assume the reference to the initial CB being UA-dependent is a mistake.
But if so this still leaves authors no way to size something relative to the
height of the viewport without using fixed positioning. This is something
*many* authors want to do, there are good uses for it, and it is already
possible across multiple browsers.

An easy fix would be to remove the UA-dependent reference and define the
'block in which the root lives' as being the same size as the viewport.
Another approach would be to make the initial CB the 'block in which the
root element lives' (instead of the CB generated by the root element) and
have it the same size as the viewport.

Also, I'm glad to see that percentage height on positioned elements whose
containing blocks have auto-height is now allowable. This will help the
production of useful CSS layouts greatly. However I suspect 10.5 -

  If the height of the containing block is not specified explicitly (i.e.,
  it depends on content height), and this element is not positioned, the
  value is interpreted like 'auto'. 

should read 'absolutely positioned' instead of just 'positioned', since
relatively positioned elements affect the size of their parent just as
much as static ones.

-- 
Andrew Clover
mailto:and@doxdesk.com
http://and.doxdesk.com/

Received on Monday, 5 August 2002 07:43:18 UTC