List Info

Thread: contradiction regarding blocks with clear at the end of a block




contradiction regarding blocks with clear at the end of a block
user name
2007-03-29 18:29:22
The aqua should cover the same height as the yellow.

  Approximate file size 529 bytes
Re: contradiction regarding blocks with clear at the end of a block
country flaguser name
United States
2007-03-29 18:42:16
I agree.  The definition of the height of a block needs to
be amended  
to account for this.

dave

On Mar 29, 2007, at 4:29 PM, L. David Baron wrote:

> http://www.w3.org/TR/2006/WD-CSS21-20061106/box.
html#collapsing- 
> margins
> contains the following text:
> # When an element's own margins collapse, and that
element has had
> # clearance applied to it, its top margin collapses
with the
> # adjoining margins of subsequent siblings but that
resulting margin
> # does not collapse with the bottom margin of the
parent block.
>
> I believe this text was intended to ensure that clear
on an empty
> block at the end of its parent expands the height of
that parent.
>
> However, the definition of the height of a block in
> http://www.w3.org/TR/2006/WD-CSS21-20061106
/visudet.html#normal-block
> contradicts this:
> # If it has block-level children, the height is the
distance between
> # the top border-edge of the topmost block-level child
box that
> # doesn't have margins collapsed through it and the
bottom
> # border-edge of the bottommost block-level child box
that doesn't
> # have margins collapsed through it.
>
> I think the correct fix for this problem would be to
change the last
> sentence of the paragraph that I quote from 10.6.3
somehow to
> reflect that the height also ends at the bottom margin
edge of the
> bottommost child if the clause from 8.3.1 quoted above
is being
> applied.
>
> If we don't make this change, I believe that
implementations that
> pass the attached testcase (which the ones I've tested
so far do)
> would be nonconformant because they violate the rule in
the quote
> from 10.6.3 above (since the div with clear has margins
collapsed
> through it).
>
> -David
>
> -- 
> L. David Baron                                <URL:
http:// 
> dbaron.org/ >
>            Technical Lead, Layout & CSS, Mozilla
Corporation
> <clear-empty-block.html>



Re: contradiction regarding blocks with clear at the end of a block
user name
2007-04-09 17:05:51
On Thursday 2007-03-29 16:29 -0700, L. David Baron wrote:
> However, the definition of the height of a block in
> http://www.w3.org/TR/2006/WD-CSS21-20061106
/visudet.html#normal-block
> contradicts this:
> # If it has block-level children, the height is the
distance between
> # the top border-edge of the topmost block-level child
box that
> # doesn't have margins collapsed through it and the
bottom
> # border-edge of the bottommost block-level child box
that doesn't
> # have margins collapsed through it.
> 
> I think the correct fix for this problem would be to
change the last
> sentence of the paragraph that I quote from 10.6.3
somehow to
> reflect that the height also ends at the bottom margin
edge of the
> bottommost child if the clause from 8.3.1 quoted above
is being
> applied.

To be more specific, I would propose changing the sentence
that
says:

  # Similarly, if the element has a non-zero bottom padding
and/or
  # bottom border, then the content ends at the bottom
margin edge
  # of the bottommost child.

to instead say:

  # Similarly, if the bottom margin of the block does not
collapse
  # with the bottom margin of its last child, then the
content ends
  # at the bottom margin edge of the bottommost child.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla
Corporation
Re: contradiction regarding blocks with clear at the end of a block
country flaguser name
United States
2007-04-09 17:21:45
On Mon, 9 Apr 2007, L. David Baron wrote:
> 
> To be more specific, I would propose changing the
sentence that says:
> 
>   # Similarly, if the element has a non-zero bottom
padding and/or
>   # bottom border, then the content ends at the bottom
margin edge
>   # of the bottommost child.
> 
> to instead say:
> 
>   # Similarly, if the bottom margin of the block does
not collapse
>   # with the bottom margin of its last child, then the
content ends
>   # at the bottom margin edge of the bottommost child.

I agree with that change.

-- 
Ian Hickson               U+1047E               
)._.,--....,'``.    fL
http://ln.hixie.ch/      
U+263A                /,   _..    _  ;`._ ,.
Things that are impossible just take longer.  
`._.-(,_..'--(,_..'`-.;.'


Re: contradiction regarding blocks with clear at the end of a block
user name
2007-04-09 17:32:14
On Monday 2007-04-09 15:05 -0700, L. David Baron wrote:
> to instead say:
> 
>   # Similarly, if the bottom margin of the block does
not collapse
>   # with the bottom margin of its last child, then the
content ends
>   # at the bottom margin edge of the bottommost child.

Actually, it should probably say "of its last in-flow
child" (add
"in-flow").

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla
Corporation
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )