

RE: "non-zero top border" in 8.3.1

From: Alex Mogilevsky <alexmog@exchange.microsoft.com>
Date: Tue, 4 Sep 2007 16:17:35 -0700
To: Ian Hickson <ian@hixie.ch>
Message-ID: <04F36FB4ED0F85459AA447F72711526FFF58F94D2E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>
> From: Ian Hickson [mailto:ian@hixie.ch]
> Sent: Tuesday, September 04, 2007 2:31 PM
> > 2) when "top border" rule is added, it has to be understood when exactly
> > it happens. Does the previous rule ("If the element's margins are
> > collapsed with its parent's top margin, the top border edge of the box
> > is defined to be the same as the parent's.") still apply? But that's not
> > what would happen if the parent had a top border. But if it didn't
> > apply, expected behavior in test 68 would not be correct.
> I don't understand what you're asking. The two sub-bullet points of the
> 6th bullet point of 8.3.1 are mutually exclusive for any one element, but
> the rules are applied to all self-collapsing blocks, so for any one set of
> margins in a set of self-collapsing blocks the rules might apply
> differently for different blocks. Could you elaborate?

It was not obvious to me that the two bullets are mutually exclusive when nested empty boxes are concerned. Second bullet says

    "The position ... is the same as *it would have been* if the element
     had a non-zero top border"

I don't think it necessary means that position of that element's children is also defined to be as if the parent had a top border (because it doesn't actually have it, therefore previous bullet could apply to children). That is what is making this rule confusing.

If however we mean it literally, and to determine the element position we put a top border on it and let it have full effect on everything the actual expected behavior for http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/068.html

should be as in attached image, shouldn't it?

(image/jpeg attachment: topborder.JPG)

Received on Tuesday, 4 September 2007 23:17:48 GMT
