Re: [CSS21] The 'clear' property on table wrappers.

On 05/06/2012 18:11, Simon Sapin wrote:
> Hi,
>
> Elements with 'display: table' generate two boxes: a table wrapper box
> and a table box.
>
> 17.4 explains how the computed values on the element are distributed to
> the two boxes:
>
>> The computed values of properties 'position', 'float', 'margin-*',
>> 'top', 'right', 'bottom', and 'left' on the table element are used on
>> the table wrapper box and not the table box; all other values of
>> non-inheritable properties are used on the table box and not the
>> table wrapper box.
>
> In a previous email, I already reported that 'z-index' should be added
> to the list of properties that are used on the table wrapper box and not
> the table box. I just found that this is the case for 'clear' as well:
>
> If 'clear' is to have an effect, the table and its captions (if any)
> should stay together and not be separated by clearance.

Well, the table wrapper box establishes a new block formatting context, 
so the scope of 'clear' would be limited to that context if it were to 
act on the table box.  In other words, having 'clear' act on the table 
box could be useful to clear floated caption boxes but we wouldn't ever 
have a situation where there would be clearance actually separating the 
caption boxes from the table (as would arise if we had to take floats 
that exist outside the table wrapper box into account).

That said, in a world where properties can only act on one or other of 
the two boxes, the use case for having 'clear' (and 'z-index') act on 
the table wrapper box is a lot stronger than that for having it act on 
the table box!

I've filed this at https://www.w3.org/Bugs/Public/show_bug.cgi?id=17505 
(noting Gérard's subsequent test case bug report and David's subsequent 
comments about 'vertical-align' and 'line-height' in Gecko).

Cheers,
Anton

Received on Saturday, 16 June 2012 10:21:09 UTC