W3C home > Mailing lists > Public > www-style@w3.org > January 2007

Re: Question about linking CSS to XML vocabularies

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 05 Jan 2007 14:09:21 +1300
Message-ID: <459DA541.2000101@inkedblade.net>
To: www-style@w3.org

Dave Raggett wrote:
> 
> The CSS3 selectors spec provides a means for substring matching that can 
> act as an alternative to the HTML class attribute. It is not an exact 
> match, since it has different specificity, and it doesn't explicitly 
> support the notion of whitespace separated lists of tokens, but it is 
> good enough for the purpose.

.myclass and [class~="myclass"] have exactly the same specificity and
match exactly the same set of 'class' attribute values.

   http://www.w3.org/TR/css3-selectors/#attribute-selectors
   # [att~=val]
   #    Represents an element with the att attribute whose value is a
   #    whitespace-separated list of words, one of which is exactly "val".

   http://www.w3.org/TR/css3-selectors/#specificity
   # * count the number of class selectors, attributes selectors, and
   #   pseudo-classes in the selector (= b)

~fantasai
Received on Friday, 5 January 2007 01:09:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:49 GMT