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

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

From: Bruno Fassino <fassino@gmail.com>
Date: Tue, 22 Jul 2008 00:12:39 +0200
To: <www-style@w3.org>
Message-ID: <04890E21A74F495B9F57C5D73C9457EA@bruno>
Arron Eicholz wrote:
>> In 8.3.1:
>> 
>> "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..."
[...]
> 
> Fantasai and Arron wrote some tests for this issue:
> 
>
http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0048/no-min-heig
ht.htm 
> 
>
http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0048/min-gt-heig
ht.htm 
> 
>
http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0048/min-eq-heig
ht.htm 
> 
>
http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0049/max-eq-heig
ht.htm 
> 
>
http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0049/max-lt-heig
ht.htm 
>
> from which we conclude that
>   - Safari and Opera do not disable margin collapsing when min-height
>     or max-height is in effect.
>   - IE never collapses
>   - Firefox collapses when min-height or max-height is equal
> to the height,
>     *eats* the inner margins both when max-height is in
> effect /and/ when
>     min-height is in effect. We would expect that disabling
>     margin-collapsing when min-height is effect would cause the
> margins to add, not the inner margin to be truncated.
> and therefore this entire paragraph should be removed from the spec.


IMHO the Firefox behavior is the expected one (for both the min-gt-height,
max-lt-height cases), if we wanted to keep that part of the spec.
In that cases the height of the outer div (div1) is, according to 10.7,
dictated by the min-height (or by the max-height) property and no more by
the content, so it seems correct to have the inner margin "eaten": one may
think that it simply "overflows" the container, with no effect on what
follows.
(The two margins are really not adjoining (they do not start at the same
vertical level), it would be strange to have them added and also it would be
strange to have them collapsed in the usual way.)

So I still prefer to keep that part, just with the correction:

'min-height' less than the element's used height  -->  'min-height' not
affecting the element's height
'max-height' greater than the element's used height  -->  'max-height' not
affecting the element's height

or something equivalent.


Bruno

-- 
Bruno Fassino http://www.brunildo.org/test



Received on Monday, 21 July 2008 22:13:51 GMT

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