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

Bert Bos wrote:
> 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.

Certainly. (My question was rhetorical, merely intended to express my
dislike for the current wording.)

[As I noted in [1], contrary to what I originally claimed, the baseline
of an inline-block and an inline-table /is/ in fact defined in the spec,
as is required.  However, it occurs at the bottom of the section for
'vertical-align', whereas it should probably be moved up to the
'line-height' section being discussed.]


> 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").

This change works well for me, in that it now meaningfully provides the
definition of the baseline of a line box (which is absent from the text
in its current form) by reference to a strut.  However, it does so in a
rather roundabout way, with the definition implicit in a sentence which
is primarily concerned with engineering a minimum line box height
through the introduction of the strut.  I'm finding myself increasingly
persuaded by David Baron's proposal for a "root inline box".[1]

[1] http://lists.w3.org/Archives/Public/www-style/2009May/0191.html

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Monday, 31 August 2009 21:25:33 UTC