W3C home > Mailing lists > Public > public-css-testsuite@w3.org > August 2012

Treatment of adjoining margins of an anonymous block and block child

From: Robert Hogan <robhogan@gmail.com>
Date: Sat, 11 Aug 2012 10:21:50 +0100
Message-ID: <CAD1xn+M7VnsGJgAAq2DaQhWdVmeCsCJiiTg99xXLvDS7Wxm8Eg@mail.gmail.com>
To: Public CSS test suite mailing list <public-css-testsuite@w3.org>
Hi there,

Yet another question! :)

This is a test from the WebKit test suite: http://roberthogan.net/css/025.html

It fails on FF, apparently because FF is happy to consider the margins
of an anonymous block and its block-flow child as adjoining - so if
they can't collapse (for example because the block is self-collapsing
) the anonymous block adds in the margin from the element it wraps to
its own after-side.

In the test it is the anonymous block wrapping the 'clear' div that
adds the margin from that element to its own height.  I believe it
does this because it is following the rule: "If the top and bottom
margins of an element with clearance are adjoining, its margins
collapse with the adjoining margins of following siblings but that
resulting margin does not collapse with the bottom margin of the
parent block." Presumably this rule should not apply to anonymous
blocks but I can't see that in the spec.

What is the correct behaviour here?

Thanks,
Robert
Received on Sunday, 12 August 2012 16:26:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 12 August 2012 16:26:09 GMT