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

Le Lun 1 novembre 2010 17:33, Arron Eicholz a écrit :
> 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.
>
>>
>> > 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.
>
> 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.
>
> 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

.positive .control { background-position: 50%, 0%; }
What Firefox 3.6.12 does is to ignore the 0% value since there is only 1
background-image.
What Chrome 6, 7, Opera 10.63, Konqueror 4.5.2 do is to repeat the
background-image for the 2nd background-position (0%) value and doing
this is not correct.

.positive .control { background-position: 50%, 0%; }
should be parsed as
.positive .control { background-position: 50%; }
and then assume 'center' for vertical background-position because
"If only one value is specified, the second value is assumed to be
'center'."

Reduced testcase:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/background-position-202-experiments.htm

IMO, the decisive issue here is that this CSS3 statement:
"
The lists are matched up from the first value:
excess values at the end are not used.
"
is not honored by Chrome 7, Opera 10.63 and Konqueror 4.5.2.

regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (RC3; October 27th 2010):
http://test.csswg.org/suites/css2.1/20101027/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/

Received on Tuesday, 2 November 2010 19:23:08 UTC