W3C home > Mailing lists > Public > w3c-wai-hc@w3.org > October to December 1997

Re: CSS 2: priorities in cascading order

From: Charles McCathieNevile <charlesn@sunrise.srl.rmit.edu.au>
Date: Mon, 22 Dec 1997 13:08:51 +1100 (EST)
To: WAI HC Working Group <w3c-wai-hc@w3.org>
Message-ID: <Pine.SUN.3.91.971222125044.16960B-100000@sunrise.srl.rmit.edu.au>

On Mon, 22 Dec 1997, Jason White wrote an example. Let me give one too.

Given the following user style:

li { color: red ! class ! important}
li { color: green ! id}

and an author's style which provides as follows:

ol li.abc { color: blue ! important }
ol li#theItem { color: blue ! important }
ol li#anotherItem { color: blue }

then if there is an ordered list in the document such as:

<ol> <li class="abc"> This an item in an ordered list.
<LI ID="theItem">This item has an id code.

The first item will be red, since the user has specified a rule which 
covers classes, and is ! important
The second item will be blue, since the user's rule is less specific.
The third item will be green, since there is a user rule covering "not 
important" id-specific items.

What i am not yet sure about is whether a user rule for id should be 
specificity 100, or x00 where x is an arbitrarily large number, or 1xx
(These are from the CSS2 Working draft explanation of specificity, 

Charles McCathieNevile
Received on Sunday, 21 December 1997 21:23:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:56:12 UTC