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

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

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 20 Aug 2008 11:36:26 +0100
To: Bruno Fassino <fassino@gmail.com>
Cc: www-style@w3.org
Message-ID: <20080820103626.GA5773@pickering.dbaron.org>

On Friday 2007-10-19 22:22 +0200, Bruno Fassino wrote:
> 
> As David pointed out, my initial proposal was wrong. What about simply change:
> 
> "min-height less than the element's used height"
> 
> with:
> 
> "min-height not affecting the element's used height"  ?
> 
> This will allow margins collapsing in cases when the used height,
> _before_ taking min-height into account, is exactly equal to
> min-height.
> Such cases are probably not much relevant. Apparently a trivial
> example is a height:auto box containing an empty (or height:0) box.
> The first box has used height 0, equal to its min-width=0. I think we
> want to allow (bottom) margins collapsing here.

I think what we want to do is replace:
  # The bottom margin of an in-flow block-level element with a
  # 'height' of 'auto' and 'min-height' less than the element's used
  # height and 'max-height' greater than the element's used height
  # is adjoining to its last in-flow block-level child's bottom
  # margin if the element has no bottom padding or border. 

with:
  # The bottom margin of an in-flow block-level element is adjoining
  # to its last in-flow block-level child's bottom margin when:
  #   * the element's specified 'height' is 'auto',
  #   * the element's computed height is the same as it would have
  #     been if the specified value of 'min-height' were '0' and the
  #     specified value of 'max-height' were 'none', and
  #   * the element has no bottom padding or border. 

This fixes the issue in this thread using the hypothetical, and also
fixes the issue (pointed out recently, I think) that the text should
say something about blocks where the height conditions do not match.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Wednesday, 20 August 2008 10:37:04 GMT

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