W3C home > Mailing lists > Public > www-style@w3.org > December 2006

Re: Question about linking CSS to XML vocabularies

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 28 Dec 2006 19:54:00 +0100
To: "Mike Bremford" <mike-css@bfo.co.uk>
Cc: www-style@w3.org
Message-ID: <op.tk99gaod64w2qv@id-c0020>

On Thu, 28 Dec 2006 19:46:29 +0100, Mike Bremford <mike-css@bfo.co.uk>  
> Styling of arbitrary XML doesn't require any additional attributes to be  
> added. The "#id" and ".class" selectors are just syntactic sugar for the  
> attribute selectors "[id=id]" and "[class~=class]" - there is nothing  
> special about those attributes in CSS, and they don't need to exist in  
> your XML vocabulary.

This is partially inaccurate. #foo matches any element with an ID of  
"foo". This is different from any element with an "id" attribute whose  
value is "foo" (which is what you're suggesting). The same applies to the  
class selector. Of course, this difference is quite theoretical as long as  
you use CSS over the web (where you shouldn't use proprietary formats).

Anne van Kesteren
Received on Thursday, 28 December 2006 18:54:12 UTC

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