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

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
http://lists.w3.org/Archives/Public/www-style/2009May/0190.html.

> 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.

Indeed.

> 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/2006/WD-CSS21-20061106/visudet.html#normal-block
with
http://www.w3.org/TR/2009/CR-CSS2-20090908/visudet.html#normal-block .]

cheers,
Anton Prowse
http://www.moonhenge.net

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