W3C home > Mailing lists > Public > www-style@w3.org > August 1999

Re: Competing classes

From: Håkon Wium Lie <howcome@opera.com>
Date: Fri, 13 Aug 1999 08:31:36 -0400 (EDT)
Message-Id: <199908131230.OAA25659@stovner.sys.sol.no>
To: "Braden N. McDaniel" <braden@shadow.net>
Cc: <www-style@w3.org>
Also sprach Braden N. McDaniel:

 > Surely this case is specified and I just haven't been able to find it...
 >   .red { color: red }
 >   .blue { color: blue }
 >   ...
 >   <p class="red blue">What color am I?
 > Who wins, and why?

The text is blue. Both rules in the stule sheet applies, and cascading
rule #4 says that the latter one wins:

  Finally, sort by order specified: if two rules have the same weight,
  origin and specificity, the latter specified wins. Rules in imported
  style sheets are considered to be before any rules in the style sheet



Håkon Wium Lie                     http://www.opera.com/people/howcome
howcome@opera.com                                gets you there faster
Received on Friday, 13 August 1999 13:57:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:51 UTC