W3C home > Mailing lists > Public > www-style@w3.org > June 2010

Re: Issue 158 proposed text

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 28 Jun 2010 11:43:33 -0700
Message-ID: <AANLkTinOYaj9i5JzRfn9haBAmCin2-JUC-lBD2zVsiTp@mail.gmail.com>
To: Bruno Fassino <fassino@gmail.com>
Cc: www-style list <www-style@w3.org>
On Mon, Jun 28, 2010 at 11:01 AM, Bruno Fassino <fassino@gmail.com> wrote:
> On Mon, Jun 28, 2010 at 6:50 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> I added language to make it clear I'm explicitly defering to the
>> normal margin-collapse rules.  This isn't meant to be a special case;
>> it should lay out the element *exactly* like it wasn't clearing at
>> all.
>> Is that sufficient?
> It is not explicitly stated what margins are considered during this
> collapsing to determine the hypothetical position.
> It is said "preceding margins", but I don't think this is precise enough.
> Consider something like this:
> <div style="background: lime; border-top: 1px solid">
>        <div style="float: left; background: blue; height: 50px; width: 100px"></div>
>        <div style="clear: left">
>                <div style="margin-top: 60px"></div>
>        </div>
> </div>
> <div style="background: yellow">next</div>
> (you can see it at http://brunildo.org/test/margin-collapse-clear-child-7.html)
> Should the top margin of the child of the div with clear, after the
> float, be considered in the computation of the hypothetical position?
> It collapses with the (null) top margin of the clear, but does not
> seem to be a "preceding" margin.
> However I doubt the intention is to really exclude it. At least
> Firefox and Safari seem to behave as if it was considered in the
> hypothetical position, and so as if no clearance was necessary here.

Again, the intention is to collapse all margins exactly as they would
normally be collapsed, as if clearance wasn't present.  Should I
remove the word "preceding" or something, if that's causing the
confusion?  Perhaps this would work better:

Computing the clearance of an element on which 'clear' is set is done
by first determining the hypothetical position of the element's top
border edge within its parent block.  This position is determined
after the top margin of the element has been collapsed with all
appropriate adjoining margins, per normal margin-collapsing rules.

Received on Monday, 28 June 2010 18:44:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:47 UTC