W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [CSS21] Issues with inline formatting model (particularly 10.8)

From: Peter Moulder <peter.moulder@monash.edu>
Date: Tue, 03 Aug 2010 09:39:42 +1000
To: "www-style@w3.org" <www-style@w3.org>
Message-id: <20100802233942.GA6067@bowman.infotech.monash.edu.au>
On Mon, Aug 02, 2010 at 11:36:40AM -0700, fantasai wrote:
> On 07/31/2010 08:50 AM, Anton Prowse wrote:
> >Anton Prowse wrote:

> >Issue 14: not relevant
> >
> >To *ensure* that the "Calculating heights and margins" part of the spec
> >concerns itself only with content area height and doesn't stray into
> >tangential matters, the following sentences should be moved from that
> >section down to 10.8.
> >
> >10.6.1 (Inline, non-replaced elements):
> ># The vertical padding, border and margin of an inline, non-replaced
> ># box start at the top and bottom of the content area, not the
> ># 'line-height'. But only the 'line-height' is used when calculating
> ># the height of the line box.
> >
> >(Also cf. Issue 3b [2,3].)
> >
> >10.6.2 (replaced inline/inline-block elements):
> ># For 'inline' and 'inline-block' elements, the margin box is used
> ># when calculating the height of the line box.
> >
> >10.6.6 (non-replaced inline-block elements):
> ># For 'inline-block' elements, the margin box is used when calculating
> ># the height of the line box.
> I don't see these edits as necessary.

The arguments that some sort of change is necessary are:

  - Section 10.8 is currently liable to be misunderstood because
    of its use of the notion of the height/top/bottom of an inline box,
    without it being clear whether it's the content/border/margin box
    whose height/top/bottom is sought, and without it being clear
    that section 10.6.{1,2,6} is what gives the answer;
    and the existing sentences in sections 10.6.{1,2,6} aren't clear
    about this either: they say that something is "used when calculating
    the height of the line box", but don't say how it's used.

  - The first sentence that Anton Prowse suggests for removal
    might be misinterpreted as saying that the vertical border and margin
    of an inline box each start at the top and bottom of the content area.

The first of those in particular is a problem that needs addressing
(at least in the text currently visible at http://www.w3.org/TR/CSS21/visudet.html):
I for one didn't understand the existing text.

Any part of the text Anton has pointed to that is to remain in section 10.6 and
that merely repeats information given elsewhere, I suggest clarifying this by
parenthesizing it and adding "as explained in section ..." or "see ...".  For
example, doing this would help with the "padding/border/margin start at"
sentence because then the sentence is allowed to be ambiguous (and the reader is
spared the concern of deciding the correct interpretation): the reader is
referred elsewhere for the normative and correct information.

(The appropriate reference in this example is
<a href="box.html#box-dimensions">section 8.1</a>.)

> >Issue 16:
> >
> >10.8.1 says:
> ># On a block-level, table-cell, table-caption or inline-block element
> ># whose content is composed of inline-level elements, 'line-height'
> ># specifies the minimal height of line boxes within the element. [...]
> >
> ># On an inline-level element, 'line-height' specifies the height that
> ># is used in the calculation of the line box height (except for inline
> ># replaced elements, where the height of the box is given by the
> ># 'height' property).
> >
> >I don't follow the inline-block bit at all: does "whose content is
> >composed of inline-level elements" qualify inline-block, or all the
> >element types listed? Why is this case noteworthy? What if the content
> >isn't composed like that? Also, shouldn't inline-table be mentioned
> >here, or should we really not be highlighting inline-block and
> >inline-table at all and instead talk about inline-level block containers
> >(see [5])? See also [6; Issue 2].
> This sentences is talking about block containers that contain inline-level
> content. (See issue 120.) It doesn't apply to block containers that
> contain only block-level content, because they do not have line boxes.

One change that's necessary here is that the existing text is wrong for the
case of an element A whose children are all inline-level elements but one or
more of them contains a block-level element B that specifies a smaller
'line-height': the existing text incorrectly says that A's 'line-height' is a
minimum for the line boxes in B.

[At least, I assume that it's incorrect and that A's 'line-height' is
irrelevant to the line boxes in B in this case, though I'm only guessing.]

The fix would be to talk about boxes instead of elements, and to insert
the text "(after applying the anonymous block rules in section".

This is becoming a habitual ending to my messages, but I haven't yet read
the rest of this message as I need to leave now.

Received on Monday, 2 August 2010 23:40:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:48 UTC