W3C home > Mailing lists > Public > www-style@w3.org > June 2005

[CSS2.1] Attribute selectors

From: George Chavchanidze <gch@rmi.acnet.ge>
Date: Wed, 15 Jun 2005 18:34:08 -0400 (GMT)
To: www-style@w3.org
Message-ID: <Pine.GSO.3.96.1050615183256.27687C-100000@rmi-sun.rmi.acnet.ge>

Quote from CSS2.1 
	Thus, while it is not the case that a CSS2 stylesheet is
necessarily forwards-compatible 
	with CSS 2.1, it is the case that a stylesheet restricting itself
to CSS 2.1 features is 
	more likely to find a compliant user agent today and to preserve
forwards compatibility 
	in the future.

There is at least one thing that artificially breaks forward compatibility
with CSS3:  namespace selectors. 

Quote from CSS3 selectors:
	the down-level client will view and match element type and
attribute selectors 
	based on their fully qualified name, not the local part as
outlined in the Type selectors 
	and Namespaces section. CSS selectors may be declared using an
escaped 
	colon "\:" to describe the fully qualified names, e.g. "html\:h1"
will match <html:h1>. 
	Selectors using the qualified name will only match XML elements
that use the same prefix. 
	Other namespace prefixes used in the XML that are mapped to the
same URI will not match 
	as expected unless additional CSS style rules are declared for
them. 
	Note that selectors declared in this fashion will only match in
down-level clients. 
	A CSS namespace aware client will match element type and attribute
selectors 
	based on the name's local part. So selectors declared with the
fully qualified name 
	will not match (unless there is no namespace prefix in the fully
qualified name).


Being namespace unaware CSS2.1 artifically encourages users to use
attribute selectors
that will be simply ignored by CSS3 rendering engines. Since CSS2.1 was
released after
'Namespaces in XML' recomendation I think it must address issue with
qualified names based
versus namespace based selector matching. Otherwise implementing CSS3
selectors in browsers
will break some of existing web pages.
Received on Wednesday, 15 June 2005 14:23:34 GMT

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