Re: [CSS2.1] Clarifying 8.3.1 Collapsing Margins

On 07/29/2010 12:10 AM, Peter Moulder wrote:
> Thanks for looking into fixing this bit of troublesome text.
>
> On Wed, Jul 28, 2010 at 08:01:12PM -0700, fantasai wrote:
>
>>   | In CSS, the adjoining margins of two or more boxes (which could be
>>   | next to one another
>
> "next to" is unclear: "next to" would usually be understood in a geometric
> sense.  I suggest "could be siblings" if that is the intended meaning.

Fixed.

>>   | or could be nested) can combine to form a single margin.
>>
>>   | Margins that behave this way are called<dfn>collapsing margins</dfn>.
>
> It isn't clear whether "collapsing margins" is defined as margins that do
> combine, or margins that can combine (for example that meet the criteria given
> in this sentence but don't meet the criteria that follow).
>
> I suggest s/behave this way/combine in this way/.

Fixed.

> Also, this "are called" wording is unclear as to whether any other
> margins are considered collapsing margins.
>
> Also, this text describes the phrase "collapsing margins", but most
> parts of the spec talk of "margins that collapse" or similar, which isn't
> clearly defined by a definition of "collapsing margins".  So please
> put just the word "collapse" in<dfn>.

Fixed.

>>   | Two margins are adjoining if and only if:
>>   |   * no non-empty content, padding or border areas; line boxes;
>>   |     or clearance separate them
>
> The above has many different possible parsings:
>
>    - Does "non-empty" associate with "padding" and "border areas" or just with
>      "content" ?
>
>    - Does "areas" associate with "content" and "padding" or just with "border" ?

Fixed.

> It's also unclear what "separate" means.  As with "next to", one would usually
> interpret the word "separate" in a geometric sense, which would be unfortunate.

I think it's clear enough what "separate" means in this context.

> The word "clearance" isn't in the index, and the concept isn't introduced until
> a later chapter.  Even if the reader had seen §9.5, it still isn't completely
> clear how to decide whether or not any clearance separates two margins.
> I'd suggest defining in terms of the box tree and the values of the 'clear'
> property on those boxes.

Not possible. See Anton's discussion of the "clearance paradox", for example,
or Tab's attempt to clarify the clearance calculations.

>>   | Vertical margins collapse if they are adjoining. [...]
>>   | However:
>>   |   [Exceptions]
>
> It's not clear whether these exceptions modify the meaning of
> "adjoining", or whether the exceptions contradict the first sentence.

They contradict the first sentence. They aren't saying anything about
these margins not being adjoining, only about not collapsing. However
I've rearranged the paragraph to clarify this point.

>>   |   * If the top and bottom margins of an element with clearance are
>
> We probably want s/element/box/ here.

Since only elements can have clearance, I'm going to leave that as-is.
If at some point we settle on a more rigorous set of guidelines for the
use of element vs. box, then we can fix that then.

~fantasai

Received on Wednesday, 18 August 2010 08:11:52 UTC