W3C home > Mailing lists > Public > public-css-testsuite@w3.org > November 2010

Re: [RC3] background-position-202 invalid; comma not a valid separator in CSS 2.1

From: Alan Gresley <alan@css-class.com>
Date: Tue, 02 Nov 2010 14:47:01 +1100
Message-ID: <4CCF89B5.2010109@css-class.com>
To: Arron Eicholz <Arron.Eicholz@microsoft.com>
CC: "css21testsuite@gtalbot.org" <css21testsuite@gtalbot.org>, "fantasai (fantasai@inkedblade.net)" <fantasai@inkedblade.net>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Arron Eicholz wrote:
> On Monday, November 01, 2010 5:08 PM Gérard Talbot wrote: 
>> Le Lun 1 novembre 2010 16:21, Arron Eicholz a écrit :
>>> On Wednesday, October 27, 2010 7:01 PM Gérard Talbot wrote:
>>>> A number of browsers (except Firefox 3.6.11; I have not checked with
>>>> IE8) fail
>>>> http://test.csswg.org/suites/css2.1/20101027/html4/background-positio
>>>> n-
>>>> 202.htm
>>>> because comma is being used as a syntaxical separator for background-
>>>> position values. This is invalid CSS 2.1.
>>>> Reduced testcase:
>> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/background-
>>>> position-202.htm
>>>> CSS validation (CSS 2.1 profile):
>>>> http://jigsaw.w3.org/css-
>>>> validator/validator?uri=http://www.gtalbot.org/BrowserBugsSection/css
>>>> 21t
>>>> estsuite/background-position-
>>>> 202.htm&warning=2&profile=css21&usermedium=all&lang=en
>>>> Validation report:
>>>> 14 	.positive .control 	Value Error : background-position , is an
>>>> incorrect operator : 50%,0% 50%,0%
>>>> 15 	.case.t10 .test 	Value Error : background-position , is an
>>>> incorrect
>>>> operator : 50%,center 50%,center
>>> This test is designed to be forward compatible with CSS3. In order to
>>> be compatible with CSS3 syntax, which we changed, the tests needs to
>>> have the additional style rules ".postive .control" and ".case.t10
>>> .test". If these rules are not in the test then the test cannot be
>>> used for CSS3 as well.
>>> This issue is more of an issue with the CSS3 spec not being compatible
>>> with CSS2.1 but it should not invalidate this tests in any way.
>> Sorry. I did not mean to say that we should reject the whole testcase
>> http://test.csswg.org/suites/css2.1/20101027/html4/background-position-
>> 202.htm
>> but only the part using comma.
> Ok good since the rest of the case is really helpful.
>> All I'm saying is that using comma as a syntaxical separator for
>> background- position values is invalid CSS 2.1.
> Yep it is for CSS 2.1 but it isn't an error if you support CSS3 backgrounds & borders.

Correct Arron. This is more than testing support of CSS2.1. This is 
also testing what authors do when trying to gracefully support older 

>>> If
>>> browsers are failing this test
>> Chrome 6.0.472.63, Safari 5.0.2, Chrome 7.0.517.41, Opera 10.63 and
>> Konqueror 4.5.2 fail this reduced testcase:
>> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/background-
>> position-202.htm
>> only because of that comma usage.
>>> then they actually have a bug in either parsing or their
>>> implementation of CSS 2.1 background-position or CSS3
>>> background-position.
>> I'll choose CSS3 background-position here.
>>> I do not think this case should be changed since it is a good test and
>>> needs to cover all the scenarios.
>>> Potentially the case could be split out and put into its own case. If
>>> that is done, that new case with those rules, how do we flag the file.
>>> Its invalid for CSS 2.1 but valid for CSS3. This sounds like something
>>> we would have to special case for building CSS3 test suite.
>> I am for removing
>> <div class="case negative positive t10"><div class="test"><div
>> class="control"></div></div></div>
>> or even better removing the 2 commas (and correspondent comments) in
>>    .positive .control { background-position: 50%, 0%; } /* CSS3 background
>> supports comma */
>>    .case.t10 .test { background-position: 50%, center; } /* CSS3 background
>> supports comma */
>> from
>> http://test.csswg.org/suites/css2.1/20101027/html4/background-position-
>> 202.htm
>> and that's it.
> If you remove just the invalid rules for CSS 2.1 then the test will fail on implementations supporting CSS3 background & borders. That is why the test was "corrected" this way to begin with. The actual scenario being tested is that commas are not supported in CSS2.1. However in CSS3 they are supported and the case needs to handle both scenarios somehow.

Agree (See above).

> For instance the reason I changed the case to this was because IE9 now supports CSS3 backgrounds & borders and the case was failing. It however wasn't failing because IE9 was incorrect. It was failing because the CSS3 specs now support a syntax that used to be invalid. This then makes the case incorrect for new implementations. This is why I put the additional ".positive .control' rule in so the case could work in CSS3 and be ignored in CSS 2.1.

The same would apply with test involving support for a possible future 
fall back color when images are disabled.

   background: red / url(image1.png);
   background: red / url(image1.png), url(image2.png);

This is invalid CSS2.1 and CSS3. Not sure about CSS4 since the CSS4 
Background and border module is not available to the public but is secret.

> I'm not sure what the best course of action is here. Since we have created a compatibility issue within CSS 2.1 and CSS3 specs. It was necessary for the expansion of CSS but puts us in a bit of a bind with the testing side of things.
> --
> Thanks,
> Arron Eicholz

I would simply have a flag saying "invalid CSS2.1 and valid CSS3".

Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Tuesday, 2 November 2010 03:47:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:26:52 UTC