Re: [CSS21] Disposition of Comments (Issue 225, 229 etc)

On 04/07/2011 12:50 PM, Anton Prowse wrote:
>
> It covers all the cases, certainly. (Although you mean last /in-flow/ child.) But I'm not too happy about talking about the
> top edge of the collapsed margin, because 8.3.1 actually fails to explain where a collapsed margin sits in relation to the
> border edge positions of the elements involved. Quibbly, I know, but nothing in 8.3.1 says that a collapsed margin between an
> element and its last in-flow child doesn't sit /between/ the last child's bottom border edge and the element's bottom border
> edge, for example. Rather, we're relying on this 10.6.3 text to tell us that that's not the case. Hence 10.6.3 shouldn't
> define height in terms of the the top edge of a collapsed margin.
>
> How about:
>
> | If the element has children, its height is the distance from its
> | top content edge to the first applicable of the following:
> | * the bottom edge of the last line box, if the box establishes a
> | inline formatting context with one or more lines
> | * the bottom edge of the bottom (possibly collapsed) margin of
> | its last in-flow child, if the child's bottom margin does not
> | collapse with the element's bottom margin
> | * the bottom border edge of the lattermost in-flow child whose top
> | and bottom margins do not collapse
> | * zero, otherwise
>
> [CSS3 might introduce some kind of in-flow block-level element whose bottom margin doesn't collapse with its subsequent
> sibling's top margin. If that happens, we'll need to modify the third item (in the equivalent text in Basic Box Model 3) to
> say "bottom margin edge" instead of "bottom border edge" of such elements.]

Ok, if we're going to be quibbly, here's an update that avoids "lattermost":

Replace the third and fourth paragraphs of 10.6.3 with:

   | The element's height is the distance from its top content edge to the
   | first applicable of the following:
   |   * the bottom edge of the last line box, if the box establishes a
   |     inline formatting context with one or more lines
   |   * the bottom edge of the bottom (possibly collapsed) margin of
   |     its last in-flow child, if the child's bottom margin does not
   |     collapse with the element's bottom margin
   |   * the bottom border edge of the last in-flow child whose top
   |     margin doesn't collapse with the element's bottom margin
   |   * zero, otherwise

Do we win yet? :)

~fantasai

Received on Thursday, 7 April 2011 21:18:45 UTC