Counter-increment is not clear in CSS21 and CSS3 (was: Re: Bug in IE8?)

Hello,

By analysing the provided result of the Dev Toolbar and doing some tests, 
I finally found that 'none' is not an accepted value for counter-increment in 
IE8 (just like red is not a good value for border-width). So, the rule is ignored. 
It's a bug, since the spec defines 'none' as acceptable value for counter-increment. 

It seems to me that it's a bug in IE8 RC1. Maybe you should post it in the IE's 
FeedBack Center.

But, I just found another problem : The spec isn't clear about how the UA must 
treat 'none' as value for counter-increment. In fact, the prose NEVER talk about 
the effect of 'none'. So, the browser should treat none as a non-effect value, if it 
can't understand it otherly.

But, the problem is that 'none' can be a valid indetifier. So, if it's a valid identifier, 
'none' MUST be understand as 'none 1', and 'none 1' is defined in the spec, and 
should be threated as any other counter.

I tested some browsers with this :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[]>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>CSS Test: Counter-increment with the value 'none'</title>
        <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-counter-increment" />
        <meta name="flags" content="" />
        <meta name="assert" content="The counter-increment set to 'none' ==> Which result ?." />
        
    <style type="text/css">
#tc_1:before { font-size:30px; content:counter(ident);  }
#tc_2:before { font-size:30px; content:counter(ident);  }
#tc_3:before { font-size:30px; content:counter(ident);  }
#tc_4:before { font-size:30px; content:counter(none);  }
   </style>
</head>
    <body>
        <p>Test passes if the numbers '5 5 10 10' or '5 5 10 11' appear below in the same order.</p>
        <div id="tc_1" style="counter-increment:ident 5; " ></div>
        <div id="tc_2" style="counter-increment:ident 5; counter-increment:none; "></div>
        <div id="tc_3" style="counter-increment:ident 5; " ></div>
        <div id="tc_4" style="counter-increment:none 10;"></div>
    </body>
</html>

It seems that Opera handle it by showing 5 5 10 10. (it's logical, but it's not what the spec says)
Safari & FireFox are showing 5 5 10 0. (it's bugged because 'none 10' is clearly a valid counter)
IE shows 5 10 15 0. (it's bugged too, because IE considers the rules as invalid, and it's not what the spec ask to do)

But, if we follow the spec, we should get 5 5 10 11. 

            ident        none
tc1 =>   5            0
tc2 =>   5            1
tc3 =>   10          1
tc4 =>   10           11

Shouldn't be good to rewrite the prose?

We have three way to clarify the situation.

1/ The exception for just 'none' (Opera's behaviour)

    If its computed value is exactly "none", the counter-increment property is valid but has no effect.
    NOTE : 'none' can be a valid name of a counter. If the value of counter-increment is not exactly none, the UA should consider none a a valid identifier.

Then we get 5 5 10 10, which is the way Opera does the thing.

2/ None as invalid identifier (IE's behaviour)

    Note that 'none' is a invalid identifier. 
    NOTE :  Any rule that use 'none' as identifier must thus be considerated as invalid

3/ None as valid value, but as invalid identifier (FireFox & Safari)
    
    If its computed value is exactly "none", the counter-increment property is valid but has no effect.
    If a rule contains 'none' as identifier, it should be considerated as invalid, and thus ignored by the UA.

Regards,
Fremy


From: Robert Stam 
Sent: Thursday, March 12, 2009 8:37 PM
To: public-css-testsuite@w3.org 
Cc: Arron Eicholz 
Subject: Bug in IE8?


Hi,

 

Find attached a XHTML file (which is created with use from the IE8 RC1 file from chapter_12\properties\counter-increment\counter-increment-053.htm) however 

Some of the CSS is not specified in the style tag, but in the style element, notice the double 'counter-increment' in div with id tc_2.

 

All - except IE8 RC1 - major browsers (FireFox 3.0.7, Opera 9.64, Chome 1.0.154.48, Safari 3.2.1) are displaying the text as expected,

however what should be displayed regarding the spec?

 

Best Regards,

Robert Stam

 

TallComponents

 

Received on Thursday, 12 March 2009 21:22:17 UTC