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

Le Jeu 19 mai 2011 19:42, Peter Moulder a écrit :
> On Thu, May 19, 2011 at 09:52:07AM -0700, Tab Atkins Jr. wrote:
>> On Thu, May 19, 2011 at 1:57 AM, Peter Moulder
>> <peter.moulder@monash.edu> wrote:



> I append the document I've used for testing,
> which is also available at
> http://bowman.infotech.monash.edu.au/~pmoulder/html-tests/counter-suppression.html

It has validation errors

http://validator.w3.org/check?uri=http%3A%2F%2Fbowman.infotech.monash.edu.au%2F~pmoulder%2Fhtml-tests%2Fcounter-suppression.html&charset=%28detect+automatically%29&doctype=Inline&group=0

I'm not sure if it matters or should matter here.


> The UAs I've tested are Gecko, some WebKit based browsers (including
> Chromium but not Safari), Konqueror, and a ~2005 version of Opera.
> Versions are probably 1-2 years old, though I have also tested
> 2-month old development versions of Gecko & Chromium.
>
> pjrm.
>
>
> <!DOCTYPE html>
> <html>
> <head>
> <title>Test of what node suppressions affect counter increment</title>
> <style type="text/css" media="all">
> body>div { counter-reset: c 5; margin-left:40px; }
> body>div:after { content: " c=" counter(c); }
>
> img:before { content: "[before]"; counter-increment: c 100; }
> .c100:before { content: "[before]"; counter-increment: c 100; }

"[before]" in this test is not a good string; "FAIL" would be definitely
better.

.c100 in this test is not a good class identifier.


> * { list-style-type: decimal; }
> </style>
> </head>
> <body>
> <p>img: 1105 and 1,2,3,4 if child increment honoured (like Gecko &amp;
> Opera), 1005 and 1,2,3 if not (like WebKit); or 5 and 1,2,3 if the img
> itself ignores counters (like Konqueror).</p>
> <div>
>  <div>
>   <ol>
>    <p style="display:list-item;">These p's and the below img are all
> display:list-item.</p>
>    <img src="" alt="img alt" style="display:list-item; counter-increment:
> c 1000;"/>
>    <p style="display:list-item;">These p's and the above img are all
> display:list-item.</p>
>    <p style="display:list-item;">These p's and the above img are all
> display:list-item.</p>
>   </ol>
>  </div>
> </div>
> <hr />
> <p>Same as above but with list-style-position:inside:</p>
> <div>
>  <div>
>   <ol>
>    <p style="display:list-item; list-style-position:inside;">These p's and
> the below img are all display:list-item.</p>
>    <img src="" alt="img alt" style="display:list-item;
> list-style-position:inside; counter-increment: c 1000;"/>
>    <p style="display:list-item; list-style-position:inside;">These p's and
> the above img are all display:list-item.</p>
>    <p style="display:list-item; list-style-position:inside;">These p's and
> the above img are all display:list-item.</p>
>   </ol>
>  </div>
> </div>
> <hr />
> <p>table-column-group: should suppress 100 and 10000, leaving 1101018.</p>


If we strictly apply what CSS 2.1 states, then counter c should not be
incremented with 10 (table-column-group), then with 100 (child of a
table-column-group), then with 1000 (table-column) and then with 10000
(child of a table-column),  leaving 1100008.

Increments would only occur on wrapping div (c=5), at <div
style="display:table;">(c+1), at <div
style="display:table-row;">(c+100000), at <div
style="display:table-cell;">(c+1000000) and on the nested span (c+2).


> <div>
>  <div style="display:table; counter-increment: c 1;">
>   <div class="c100" style="display:table-column-group; counter-increment:
> c 10; ">
>    <p style="counter-increment: c 100;">Suppressed child.</p>
>    <div class="c100" style="display:table-column; counter-increment: c
> 1000;">
>     <p style="counter-increment: c 10000;">Suppressed child.</p>
>    </div>
>   </div>
>   <div style="display:table-row; counter-increment: c 100000;">
>    <div style="display:table-cell; counter-increment: c 1000000;"><span
> style="counter-increment: c 2;">Cell</span></div>
>   </div>
>  </div>
> </div>
> <hr />

I'll check the other 3 tests later.

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 05:05:02 UTC