- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Fri, 17 Sep 2010 00:49:58 -0700
- To: css21testsuite@gtalbot.org
- CC: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>, Arron Eicholz <Arron.Eicholz@microsoft.com>
On 07/17/2010 05:27 PM, "Gérard Talbot" wrote: > > 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."> >>> >>> 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. Actually, Gérard is right. You're comparing two rules (the author-level rule and the user-level rule) that have different weights. The rule about order does not come into play: the user rule will be overridden whether the user style sheets' rules are ordered before or after the author rule. So the testcase passes, and it's correct for it to pass, but it's not testing what the assert is saying. ~fantasai > 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
Received on Friday, 17 September 2010 07:50:34 UTC