Microsoft's cascade-006.htm

http://test.csswg.org/suites/css2.1/20100701/html4/cascade-006.htm

>> 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.

Arron,

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
}
http://www.w3.org/TR/CSS21/cascade.html#cascading-order

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">
             .cascadegreen
             {
                 color: green;
             }
         </style>

from the
http://test.csswg.org/suites/css2.1/20100701/html4/cascade-006.htm
and then change

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

into

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

The user stylesheet
http://test.csswg.org/suites/css2.1/20100701/html4/support/cascade.css
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:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (beta 1; July 1st 2010):
http://test.csswg.org/suites/css2.1/20100701/html4/toc.html

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

Received on Sunday, 18 July 2010 00:27:43 UTC