Re: [css3-multicol] Applies to block containers

On Thu, Feb 21, 2013 at 12:53:02AM +0100, Håkon Wium Lie wrote:
> Also sprach Simon Sapin:
> 
>  > Le 21/02/2013 00:30, Håkon Wium Lie a écrit :
>  > >   > I use "block container" as short for "block container box", defined here:
>  > >   >http://www.w3.org/TR/CSS21/visuren.html#block-container-box
>  > >
>  > > But properties apply to elements, not boxes.
>  > 
>  > Do they? 
> 
> In the context of "applies to:", yes:
> 
>   http://www.w3.org/TR/CSS21/about.html#applies-to
>
> (Property/value combinations can also be set on pseudo-elements,
> pseudo-classes, page selectors etc, so the whole story is a bit more
> complex.)

As you point out, that paragraph in CSS 2.1 is evidently wrong as written.
This is part of the whole element-vs-box thing: lots of text in the CSS 2.1
specifiction says "element" where it means "box".

An example involving Applies-to lines is that both 'border-collapse' and
'border-spacing' property definitions say

  # Applies to: 'table' and 'inline-table' elements 

In the appended example, there are no 'table' or 'inline-table' elements to
apply to, yet somehow 'border-collapse' and (in the case of the separated table
model) 'border-spacing' evidently do apply: the properties are only explicitly
set on block-level ancestor elements, and the properties inherit down into the
anonymous table boxes, where they do apply.

So I would be inclined to write "Applies to: block container boxes" even though
it conflicts with a literal reading of the paragraph of CSS 2.1 cited above.

Of course it would be good to fix CSS 2.1 on this point, but evidently the
CSSWG doesn't wish to devote time to fixing CSS 2.1 errors (especially
element-vs-box errors) other than by writing CSS3+ specs to supercede
parts of CSS 2.1.

I wonder, would it be worthwhile maintaining some sort of wiki of "apparent
anomolies" in CSS 2.1, sorted by section number?  If there were such a thing,
would that help avoid people getting misled by the CSS 2.1 text?  The idea is
something that says clearly that no-one has necessarily verified the reports,
so that it doesn't take up CSSWG time, but at least people can be aware of text
that should be treated with suspicion.

pjrm.


(This example also available at
http://bowman.infotech.monash.edu.au/~pmoulder/html-tests/anon-border-collapse.html
.)

<!DOCTYPE html>
<html>
<head>
<title>Test of Applies-to lines</title>
</head>
<body>
<div style="border-collapse: collapse; border-spacing: 2px;">
 <div style="display: table-cell; border: 2px solid blue;">Cell 1, collapsed</div>
 <div style="display: table-cell; border: 2px solid blue;">Cell 2, collapsed</div>
 <div style="display: table-row;">
  <div style="display: table-cell; border: 2px solid blue;">Row 2, collapsed</div>
 </div>
</div>
<div style="border-collapse: separate; border-spacing: 2px;">
 <div style="display: table-cell; border: 2px solid blue;">Cell 1, separate</div>
 <div style="display: table-cell; border: 2px solid blue;">Cell 2, separate</div>
 <div style="display: table-row;">
  <div style="display: table-cell; border: 2px solid blue;">Row 2, separate</div>
 </div>
</div>
</body>
</html>

Received on Friday, 22 February 2013 10:31:52 UTC