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

Re: [CSS21][css3-content] counters and table-column / table-column-group

From: Gérard Talbot <www-style@gtalbot.org>
Date: Thu, 19 May 2011 21:15:47 -0700
Message-ID: <427e67986efdd51f067e655a1dbcb247.squirrel@cp3.shieldhost.com>
To: "Peter Moulder" <peter.moulder@monash.edu>
Cc: "W3C style mailing list" <www-style@w3.org>

Le Jeu 19 mai 2011 1:57, Peter Moulder a écrit :
> The spec has this to say about the behaviour of counters on
> display:table-column[-group] elements:
>   Section 17.2:
>     # Elements with 'display' set to 'table-column' or
>     # 'table-column-group' are not rendered (exactly as if they had
>     # 'display: none')


>   CSS 2.1 section 12.4.3 and css3-content section 8.3:
>     # An element that is not displayed ('display' set to 'none') cannot
>     # increment or reset a counter.


> I think a person could quite reasonably conclude that
> display:table-column[-group] elements ignore their
> counter-increment/-reset properties, whereas all UAs I've tested
> other than Konqueror do process counter-increment (and I assume
> counter-reset) for these elements.


I just tested

Counter-increment applied to elements with 'display' set to

Counter-increment applied to elements with 'display' set to 'table-column'

Firefox 4.0.1, Opera 11.11, Chrome 11.0.696.68 and Konqueror 4.6.3 all
display "5" in both testcases, therefore pass those 2 testcases.

Incidentally, what I don't like in those 2 testcases is that the counter
and counter-increment are not in the scope of a declared counter-reset.

Counter-reset applied to elements with 'display' set to 'table-column-group'

Counter-reset applied to elements with 'display' set to 'table-column'

Firefox 4.0.1, Opera 11.11, Chrome 11.0.696.68 and Konqueror 4.6.3 all
display "5" in both testcases, therefore pass those 2 testcases.

> Konqueror behaves strangely for counter increments within a table,

Yes. Konqueror 4.6.3 fails these 2 tests:



> so I
> hesitate to read much into its results; but in my testing,

I have not examined your testcases (that just appeared in the mailing list
but will do later).

> it honoured
> counter-increment on table-column-group but not on table-column.
> Children of table-column[-group] that are suppressed by the rules of
> 17.2.1, on the other hand, don't increment counters in any of the UAs
> I've tested.
> A very tentative proposal would be:
>   - Change "are not rendered (exactly as if ...)" to
>     "do not generate any boxes"; and be explicit either
>     that 'counter-reset' and 'counter-increment' still have effect,
>     or that their behaviour is undefined.

Yes. +1 for your proposed change, in particular on being explicit if
'counter-reset' and 'counter-increment' still have effect.

>   - Change "that is not displayed (...)" to
>     "whose 'display' has value 'none'".
>   - In section 17.2.1, be explicit that those suppressed children
>     cannot affect counters.
> Those first couple of changes are a bit risky to change at this point
> in CSS 2.1.  An alternative would be just to add a sentence to each
> that deals just with the interaction between counters and
> table-column[-group].
> pjrm.

I think you spotted a flaw, a weakness in the spec. Otherwise a lot of
browsers are wrong.

regards, Gérard
CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Friday, 20 May 2011 04:16:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:34:52 UTC