W3C home > Mailing lists > Public > public-forms@w3.org > March 2008

Re: CSS3 namespace feedback

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Wed, 12 Mar 2008 23:00:56 +0100
To: "John Boyer" <boyerj@ca.ibm.com>, "Forms WG" <public-forms@w3.org>(new)
Message-ID: <op.t7w836nbsmjzpq@acer3010>

On Wed, 12 Mar 2008 20:27:40 +0100, John Boyer <boyerj@ca.ibm.com> wrote:
> In the telecon today, we were unable to get back around to the topic  
> after
> the beginning of the call, but with respect to your proposed feedback
> here:
> http://lists.w3.org/Archives/Public/public-forms/2008Mar/0012.html
> Nick and I both felt that in principle the backwards compatibility
> argument was a good piece of feedback.
> I wondered, however, at what a resulting change would look like.  Would
> the behavior of  unqualified names seem bizarre or unnatural to
> namespace-aware authors?
> A few code examples might clarify quickly whether it "feels right".

Actually, I think XPath should have done this too. In my experience the  
first place a beginner trips up with XPath is trying to select like  
"html/body/p[1]"and wondering why it doesn't work. The answer is of  
course: you have to qualify elements. It would have been better if  
unqualified names matched any namespace (rather than the mythical no  

So, my proposal is:

	a {text-decoration: underline; color: red}

should work with elements in any namespace, which is how it works now in  
CSS without namespace awareness (as long as the elements are unqualified  
in the document).

If you want to select elements in particular namespaces, then say so:

	@namespace html "http://..."
	@namespace svg  "http://..."

	html|a {color: blue}
	svg|a {color: green}

So putting it all together:

	@namespace html "http://..."
	@namespace svg  "http://..."

	a {text-decoration: underline; color: red}
	html|a {color: blue}
	svg|a {color: green}

all a elements would be underlined. XHTML ones would be coloured blue, SVG  
ones would be coloured green, and the rest would be red. In a  
non-namespaced CSS processor, all a elements would be red (and underlined).

Does that help?

Received on Wednesday, 12 March 2008 22:01:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:56 UTC