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

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 UTC