W3C home > Mailing lists > Public > public-css-testsuite@w3.org > December 2011

[nightly-unstable] html-precedence-005 is incorrect

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Tue, 13 Dec 2011 14:15:52 -0800
Message-ID: <1c292c8a449558685c213ee739a8d0a9.squirrel@gtalbot.org>
To: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>


User stylesheet has:

.green { color: green; }

<p><font color="red" class="green">This text should be green.</font></p>

color="red" is supposed to be converted into an author rule with a
specificity of 0 since

these [non-CSS presentational hints] attributes are translated to the
corresponding CSS rules with specificity equal to 0, and are treated as
if they were inserted at the start of the author style sheet.
6.4.4 Precedence of non-CSS presentational hints

And non-!important author rules wins over (has precedence over)
non-!important user rules :

In ascending order of precedence:

2.  user normal declarations
3.  author normal declarations
6.4.1 Cascading order

So, importance and origin decide for that sentence regardless of
specificity of selector.

So, that sentence should be red, not green.

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

CSS 2.1 Test suite RC6, March 23rd 2011:

CSS 2.1 test suite harness:

Contributing to to CSS 2.1 test suite:
Received on Tuesday, 13 December 2011 22:16:35 UTC

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