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')


http://www.w3.org/TR/CSS21/tables.html#table-display


>   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.
>

http://www.w3.org/TR/CSS21/generate.html#undisplayed-counters


> 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.


Peter,


I just tested

Counter-increment applied to elements with 'display' set to
'table-column-group'
http://test.csswg.org/suites/css2.1/20110323/html4/counter-increment-applies-to-005.htm

Counter-increment applied to elements with 'display' set to 'table-column'
http://test.csswg.org/suites/css2.1/20110323/html4/counter-increment-applies-to-006.htm

Results:
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'
http://test.csswg.org/suites/css2.1/20110323/html4/counter-reset-applies-to-005.htm

Counter-reset applied to elements with 'display' set to 'table-column'
http://test.csswg.org/suites/css2.1/20110323/html4/counter-reset-applies-to-006.htm

Results:
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:

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/ppk-counter-test.html


http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/CountingNestedTables.html

> 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
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Friday, 20 May 2011 04:16:18 GMT

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