Re: [CSS21] Distinguishing block boxes, block containers, and block-level elements

On Tue, Aug 17, 2010 at 07:30:00PM -0700, fantasai wrote:
> On 08/10/2010 09:10 AM, Anton Prowse wrote:
> >
> >So a table caption is not a block level element.
> 
> The details of table-* formatting is left to Chapter 17. The lists
> are worded to be non-exclusive, so that other chapters (and future
> specifications) can specify whether other types of boxes generate
> block-level boxes, inline-level boxes, block containers, or other
> things defined here.

If using non-exclusive lists, then we need to make sure that for each 'display'
value there's text that says whether or not it makes an element or box
block-level, or inline-level, or a block container box or whatever.
In particular, I don't think that silence is enough to infer that something
is neither block-level nor inline-level.

It may help to say that no inline-level boxes or elements are block-level, so
that saying that something is block-level also serves to answer the question of
whether or not it's inline-level.

Another wording trick would be to give a complete list, but say that it's only
complete for the values of 'display' defined in CSS2.1.


Something that may be relevant to this discussion is that I've found that if
I have a 'table-row' element as a child of an 'inline' element then some user
agents (WebKit and Opera but not Gecko; though non-current versions in each
case) seem to apply anonymous block boxes (9.2.1.1) to the situation for some
reason, whereas my understanding of the spec is that it's intended for this to
result in an anonymous inline-table box.  Using anonymous blocks could be
justified if there were no text that explicitly said that 'table-row' elements
don't result in a block-level box.

A more extreme (at the risk of being less believable) example is that given

  <p><span>Hello</span><span>world</span></p>

we don't want the two spans to be given block-level treatment on the grounds
that nothing in the spec says that 'inline' can't be a block-level box.


> >Can there be more than on caption box per table? Chapter 17 seems
> >pretty confused on the matter, although HTML401 explicitly forbids the
> >possibility of multiple captions.

HTML401 forbids the possibility of multiple <caption> elements, but
doesn't forbid the possibility of multiple elements with display:table-caption.

That said, none of the user agents I've tested actually render
multiple display:table-caption elements in a given table,
so I wonder whether CSS2.1 will end up not requiring
multiple captions to be displayed.

pjrm.

Received on Wednesday, 18 August 2010 13:59:11 UTC