Re: [CSS21] CR-CSS21-20070719, 8.3.1 Collapsing in presence of min/max-height, small correction suggested

On Wednesday 30 July 2008 03:34, fantasai wrote:
> Arron Eicholz wrote:
> >> I don't think it makes sense for margins that aren't anywhere
> >> close to being "adjoining" to collapse.
> >
> > So... new issue: in
> >   <div style="height: 500px;">
> >     <div style="height: 10px;"/>
> >   </div>
> > We can't find anything in the spec that says these margins aren't
> > adjoining, but there's this sentence in 8.3.1
> >   # the expression collapsing margins means that adjoining margins
> >   # (no non-empty content, padding or border areas or clearance
> >   # separate them) of two or more boxes (which may be next to one
> >   # another or nested) combine to form a single margin.
> > which says that they are adjoining and do collapse.

Are they really adjoining? There seems to be quite a bit of stuff to 
separate them, 490px of content to be precise.

> >
> > Given the effort that went into that paragraph about
> > min/max-height, it doesn't seem like this interpretation was the
> > spec writers' intent. Are we missing a sentence somewhere else or
> > is this really a gaping hole in the Collapsing margins section?
>
> Filed as CSS2.1 Issue 67
>    http://csswg.inkedblade.net/spec/css2.1#issue-67

Maybe what's missing is a rule that says that an element with a 'height' 
other than 'auto' doesn't collapse its bottom margin with its children.

Let's call this rule R1.

That seems to give (a strong indication of) the solution for issue 14, 
too: 'min-height' replaces 'height' according to 10.7, but only 
if 'min-height' is greater, not if it is equal. According to my rule 
R1, the bottom margin collapses with children if there is no 'height' 
applied. That means that the answer to issue 14 is: yes, the text must 
be changed, because 'min-height' is not applied and thus the margins do 
collapse.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Wednesday, 30 July 2008 13:53:33 UTC