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

Microsoft's cascade-006.htm

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Sat, 17 Jul 2010 17:27:07 -0700
Message-ID: <50f52188bd13e0f74e3663a0aabfddd2.squirrel@cp3.shieldhost.com>
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Cc: "Arron Eicholz" <Arron.Eicholz@microsoft.com>


>> 36-
>> http://test.csswg.org/suites/css2.1/20100701/html4/cascade-006.htm
>> <meta name="assert" content="The latter specified rule wins when
>> having
>> the same specificity and weight in user styles sheets.">
>> needs to be tuned, tweaked. The last redefining rules comes from
>> author
>>         <style type="text/css">
>>             .cascadegreen
>>             {
>>                 color: green;
>>             }
>>         </style>
>> and is a normal (not !important) rule: so it wins over the user
>> stylesheet rules
>> <div class="cascadegreen cascadered">Filler Text</div>
>> <meta name="assert" content="The latter specified rule wins when
>> having
>> the same specificity and weight in user styles sheets.">
>> This cascade-006.htm test does not test what it was intended/aiming at
>> testing actually.
> It actually is the later specified rule is in the test file itself. The
> CSS file that is applied using user stylesheet rules is actually an
> earlier specified style rule in the order.


There is a problem with the title (and its assert) of that testcase or
with the code.

Sort according to importance (normal or important) and origin (author,
user, or user agent). In ascending order of precedence:

   1. user agent declarations
   2. user normal declarations
   3. author normal declarations

So, author normal declarations have precedence over user normal
declarations regardless of which user normal declaration is declared
before or after another user normal declaration.

The sorting by order (later versus earlier) is only supposed to occur if
2 declarations have the same weight and the same origin

sort by order specified: if two declarations have the same weight,
origin and specificity,

For that testcase to actually test what its assert says, I would remove
the author normal declarations

        <style type="text/css">
                 color: green;

from the
and then change

<div class="cascadegreen cascadered">Filler Text</div>


<div class="cascadered cascadegreen">Filler Text</div>

The user stylesheet
would remain the same.

Then, the latter specified rule in an user stylesheet when 2 rules have
the same weight and same specificity. The way I see this, you need to
remove the single author normal declaration from the testcase.

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 test suite (beta 1; July 1st 2010):

CSS 2.1 test suite contributors:
Received on Sunday, 18 July 2010 00:27:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:14 UTC