W3C home > Mailing lists > Public > www-style@w3.org > August 2004

[CSS21] 3 margin-collapse issues?

From: Staffan Mhln <staffan.mahlen@comhem.se>
Date: Mon, 09 Aug 2004 19:15:47 +0200
To: www-style@w3.org
Message-ID: <4117CD63.2563.30D3B1@localhost>

I may have found three issues in the section on margin-collapse
(http://www.w3.org/TR/CSS21/box.html#collapsing-margins):

It seems to lack the case "display: table-cell". If that is correct, the
section could probably be simplified by just referring to elements that 
create a new block formatting context when stating what elements
never participate in a margin collapse. 

It also seems to miss specifying what happens with vertical overflow and
bottom-margin. It does specify that collapse with bottom margin and 
children does not occur if "underflow" occurs, but not that it doesn't when 
overflow happens which seems to be the interpretation of some major 
current implementations and also makes more sense than collapsing
something that isen't adjoining.

The paragraphs: 
"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.
Otherwise, either the element's parent is not taking part in the margin
collapsing, or only the parent's bottom margin is involved. The position of
the element's top border edge is the same as it would have been if the
element had a non-zero top border."

does not seem to match exactly what current browsers do. Why have two 
ways to position the element and why isn't the box always positioned after 
the collapse? To me it seems weird that the elements content area can 
start above where its margins participates in a collapse, but otherwise
i think most implementations seem to go with some version of the
second solution above? This case is however probably the defintion of 
an edge case,

 /Staffan
Received on Monday, 9 August 2004 17:16:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:32 GMT