Re: Question about linking CSS to XML vocabularies

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 UTC