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

Re: [CSS21] 9.5.2 Effect of adjacent top margin of first in-flow child on ?clearance

From: Anton Prowse <prowse@moonhenge.net>
Date: Sun, 24 Jan 2010 13:41:33 +0100
Message-ID: <4B5C3FFD.4020707@moonhenge.net>
To: www-style <www-style@w3.org>
Bruno Fassino wrote:
> I apologize if this has already been discussed, I only found it
> tangentially noted in a previous message.

I think you're referring to my post

> At 9.5.2 the hypothetical position of an element with clear is
> "determined after the top margin of the element has been collapsed
> with _previous_ adjacent margins (including the top margin of the
> parent block)"
> This seems to exclude the effect of an adjacent top margin of the
> first inflow child of the element.


> If yes, it looks strange and not intended (such a margin affects the
> position of the element's top border edge).

Agreed, I too thought it was odd.

> The clearance computation include point 2 which says:
> "the distance to which _these margins_ collapsed when the hypothetical
> position was calculated"

It is not at all clear to me what "these margins" refers to.

> (As a side note, that whole point 2 seems currently ignored by all
> browsers. Mozilla has the related bug 376365, don't know the others.
> Does this situation mean that the spec are possibly going to change
> here?)

As it stands, point 2 is completely incomprehensible to me, and I have
no idea how to test whether or not it has been implemented.  As I said
in that previous post, point 1 contemplates "the amount necessary to
place the border edge of the block even with the bottom outer edge of
the lowest float that is to be cleared", and I can't construct a
situation in which this is *not* the desired clearance.

> This is what
> happens in that browsers when there is clearance (even if the spec
> reflects this only in the margin collapsing part, not in the height
> definition, as has been noticed by David Baron
> http://lists.w3.org/Archives/Public/www-style/2007Mar/0105.html).

[As for the height thing which David raised (ensuring that clear on an
empty block at the end of its parent expands the height of that parent),
this has already been addressed, right?
Compare the last sentence of the penultimate paragraph of
http://www.w3.org/TR/2009/CR-CSS2-20090908/visudet.html#normal-block .]

Anton Prowse
Received on Sunday, 24 January 2010 12:42:38 UTC

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