W3C home > Mailing lists > Public > www-style@w3.org > April 2011

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

From: Anton Prowse <prowse@moonhenge.net>
Date: Mon, 11 Apr 2011 20:35:10 +0200
Message-ID: <4DA349DE.2090109@moonhenge.net>
To: www-style@w3.org
CC: Øyvind Stenhaug <oyvinds@opera.com>, fantasai <fantasai.lists@inkedblade.net>
On 11/04/2011 15:42, Øyvind Stenhaug wrote:
> On Fri, 08 Apr 2011 19:13:07 +0200, fantasai
> <fantasai.lists@inkedblade.net> wrote:
>
>> On 04/08/2011 03:45 AM, Øyvind Stenhaug wrote:
>>> On Thu, 07 Apr 2011 23:18:14 +0200, fantasai
>>> <fantasai.lists@inkedblade.net> wrote:
>>>
>>>> Replace the third and fourth paragraphs of 10.6.3 with:
>>>
>>> Hm, where is the top content edge defined now?
>>
>> http://www.w3.org/TR/CSS21/box.html#box-dimensions ?
>
> Right, but that seems rather implicit. I liked the old approach better,
> although the actual text was too simplified to be correct.

OK, I see the problem here.  Initially, like fantasai, I believed that 
Ch.8 was sufficient to define the top content edge.[1]  However, as I 
realised with regard to collapsed bottom margin subsequently in this 
thread,[2] 8.3.1 fails to explain where a collapsed margin sits in 
relation to the border edge positions of the elements involved (for 
example in the case where an element's top margin collapses with the top 
margin of its first in-flow child).

The flawed[1] current wording of 10.6.3 at least tries to ensure that 
the current spec fills this gap, whilst the proposed wording in [3] 
covers the collapsed bottom margin case but fails to cover any of the 
top margin cases.

Note that 9.4.1 (Block formatting contexts) does say that boxes are laid 
out one after the other, vertically, beginning at the top of a 
containing block.  But there's no more detail than that, as far as 
flowing block-level boxes goes.

Any solution needs to take account for the fact that the first in-flow 
child may have clearance, as pointed out by Øyvind in [1] for 10.6.3 but 
which in fact applies equally to 10.6.7 which is also currently flawed 
in that respect.

So, I propose the following changes.

Firstly, prepend the proposed wording[3] for 10.6.3 with the following:

   | The element's top content edge is incident with the first
   | applicable of the following:
   | * the top edge of the first line box, if the box establishes an
   |   inline formatting context with one or more lines
   | * the top edge of the (possibly collapsed) top margin of its first
   |   in-flow child, if the child does not have clearance and its top
   |   margin doesn't collapse with the element's top margin
   | * the top of the clearance (if present) or the top border edge of
   |   the first in-flow child whose bottom margin doesn't collapse with
   |   the element's top margin
   | * the element's bottom content edge

(Note that in the proposed wording in [3], we should replace
   : * zero, otherwise
with
   | * the element's (incident) bottom content edge (ie the height is
   |   zero)
since there's currently a grammatical mismatch with the first sentence 
of that proposal, and the prepended text gives us the opportunity to fix 
that.)

Secondly, replace the second and third paragraphs of 10.6.7 with:

   | The element's top content edge is incident with the first
   | applicable of the following:
   | * the top edge of the first line box, if the box establishes an
   |   inline formatting context with one or more lines
   | * the top edge of the (possibly collapsed) top margin of its first
   |   in-flow child, if the child does not have clearance
   | * the top of the clearance of its first in-flow child, if the child
   |   has clearance
   | * the element's bottom content edge
   |
   | 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 an
   |   inline formatting context with one or more lines
   | * the bottom edge of the bottom (possibly collapsed) margin of
   |   its last in-flow child
   | * the element's (incident) bottom content edge (ie the height is
   |   zero)


I'd also like to propose a modification to the second paragraph of 10.6.3:

Replace
   # If 'height' is 'auto', the height depends on whether the element
   # has any block-level children and whether it has padding or borders:
with
   | If 'height' is 'auto', the height is determined as follows.

I suggest this because the height depends on more factors that just 
those given (hence the proposed changes in [3]).


[1] http://lists.w3.org/Archives/Public/www-style/2011Feb/0492.html
[2] http://lists.w3.org/Archives/Public/www-style/2011Apr/0180.html

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Monday, 11 April 2011 18:35:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT