- From: Ian Hickson <ian@hixie.ch>
- Date: Wed, 5 Sep 2007 01:27:00 +0000 (UTC)
- To: Alex Mogilevsky <alexmog@exchange.microsoft.com>
- Cc: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
On Tue, 4 Sep 2007, Alex Mogilevsky wrote: > > It was not obvious to me that the two bullets are mutually exclusive > when nested empty boxes are concerned. The first gives a condition under which it applies, the second starts with the word "Otherwise", and describes the two conditions that are the opposite of the condition for the first bullet point. How can they _not_ be mutually exclusive? > 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. It doesn't apply to children. It only applies to the self-collapsing element itself. This only affects two things: floats in the self-collapsing block, and absolutely positioned elements that are positioned relative to the self-collapsing block using the static position. It affects those because those are specifically defined in terms of of the position of the self-collapsing box. (For floats, this is 9.5 paragraph 2 and 9.5.1 list item 4, which explicitly refers to the bullet points in 8.3.1; for absolutely positioned elements this is 10.6.4 paragraph 1, though paragraph 2 makes this mostly moot as UAs are allowed to estimate the position.) > 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? 8.3.1 specifically says: "Note that the positions of elements that have been collapsed through have no effect on the positions of the other elements with whose margins they are being collapsed; the top border edge position is only required for laying out descendants of these elements." Given the definition of a self-collapsing block (8.3.1 paragraph starting "An element's own margins are adjoining if...") the only descendants that can be affected are floats (which is called out explicitly in 9.5.1) and static-position absolutely positioned descendants (which may have their position estimated anyway). -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 5 September 2007 01:27:18 UTC