Re: [CSS21] Issues with inline formatting model (particularly 10.8)

I have an action[1] to write a response to the following:

On Sunday 01 March 2009, Anton Prowse wrote:
> 10.8.1, 'line-height' property
> (http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height) :
>
>    # On a block-level, table-cell, table-caption or inline-block 
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 block's
>    # baseline and a minimum depth below it, exactly as if each line 
box
>    # starts with a zero-width inline box with the block's font and 
line
>    # height properties (what TeX calls a "strut").
>
>
> Issue 8:  what is a block's baseline?  This is defined for
> table-cell, but not for block, inline-block or table-caption. 
> Furthermore, is the word 'block' appropriate for table-cell or
> table-caption?

The reason an inline-block and table-cell have a baseline is because two 
of them can be placed side by side and thus we need to know how to 
align them. Block and list-item do not have a baseline defined, because 
they don't need one.

But this section (10.8) isn't talking about the baselines of the 
elements, it is talking about the baselines of line boxes *inside* the 
elements. But I admit that the text is confusing. Where it says "the 
block's baseline" it actually means the baseline of a line box in the 
block.

Similarly, where it says "the block's font" it doesn't mean "block" in 
the strict sense as it is used elsewhere in the specification, but it 
refers to the previously mentioned types of elements, which are all 
like a block in this particular respect.

That is sloppy language, and it would indeed be better to avoid the 
confusion by rephrasing the paragraph.

Here is a proposed rewrite that avoids the word "block" where it is 
confusing:

    On a block-level, table-cell, table-caption or inline-block 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 line box's
                                                          ^^^^^^^^^^
    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 (what TEX calls a "strut").


[1] http://wiki.csswg.org/spec/css2.1#issue-120



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Monday, 31 August 2009 15:30:49 UTC