W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: [CSS21] Objection over Issue 203 (clearance and hypothetical position) (Was: Re: [CSS21] Clearance - the missing manual)

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 25 Mar 2011 16:11:47 -0700
Message-ID: <4D8D2133.9080300@inkedblade.net>
To: Bert Bos <bert@w3.org>
CC: "www-style@w3.org" <www-style@w3.org>
On 03/25/2011 02:00 PM, Bert Bos wrote:
>
>> While we're in this section, Arron and I noticed that the first
>> paragraph of the first clearance example is self contradicting (B2
>> has no children, but is not empty?)
>
> You two have been reading too much CSS2 lately. :-)
>
> An element with text content also isn't empty, as Řyvind already said.

That is way too subtle a distinction for an example, imho. Maybe
I have too high of an opinion of myself, but I feel like if I don't
get it, it's not a clear enough explanation for other people trying
to understand the spec.

>>     # Example 1. Assume (for the sake of simplicity), that we have
>> just # three boxes, in this order: block B1 with a bottom margin of
>> M1 # (B1 has no children and no padding or border), floating block F
>> # with a height H, and block B2 with a top margin of M2 (no padding
>> # or border, no children). B2 has 'clear' set to 'both'. We also #
>> assume B2 is not empty.
>>
>> Here's a suggested replacement:
>>     | Example 1. Assume (for the sake of simplicity), that we have
>>     | just three boxes, in this order: block B1 with *a bottom border
>>     | and* a bottom margin of M1, floating block F with an *outer*
>>     | height H, and block B2 with *a top border and* a top margin of
>>     | M2. B2 has 'clear' set to 'both'.
>
> Sure, the same computation applies when B2 has a top border instead of
> content, but having content is more common.
>
> Why the border on B1?

To be clear that B1 isn't self-collapsing, either. It also means that
we don't have to bother explaining about its children or padding.
Adding a border inhibits margin collapsing in a very clear and unambiguous
way and avoids having to add any explanation of the element's contents or
anything beyond that border edge.

>> Also, this sentence was very confusing:
>>     # We need to compute clearance C twice, C1 and C2, and keep the
>>     # greater of the two: C = max(C1,C2).
>>
>> I suggest replacing "twice" (which isn't what really happens) with
>>
>> "as two separate calculations", thus:
>>     | We need to compute clearance C as two separate calculations, C1
>>     | and C2, and keep the greater of the two: C = max(C1,C2).
>
> "Twice" seems rather shorter and easier to understand.

But you're not computing clearance twice, you're only computing it once:
it just happens to be a two-part calculation.

~fantasai
Received on Friday, 25 March 2011 23:12:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT