Re: Extend use of namespaces

----- Original Message -----
> On Mon, 20 Sep 2010 02:29:50 +0200, Aryeh Gregor
> <Simetrical+w3c@gmail.com> wrote:
> > <textArea> is probably a better example, right? You most likely
> > *don't* want to style <svg:a> and <html:a> differently -- the whole
> > point of SVG-in-text/html is that it blends in seamlessly, so the
> > author shouldn't care which parts are SVG and which parts HTML. But
> > you sure want to style <svg:textArea> and <html:textarea>
> > differently
> > (and text/html is case-insensitive, thus CSS should be here too).
> 
> Actually, the DOM and CSS are only case-insensitive for elements in
> the
> HTML namespace.

So if I want to create a combined HTML and SVG document some elements will be case-insensitive and some case-sensitive. Ouch.

> So you can select match textArea just fine.
> 

So if you want to style SVG differently to HTML you would have to do the following:

textArea {...} - matches both SVG (case-sensitive) and HTML (case-insensitive).
TEXTAREA {...} - matches only HTML (case-insensitive).

That means that any time you want to style SVG you would have to reset the styles of TEXTAREA, e.g. say I wanted to set SVG textarea elements the same color/background-color then I would have to write:
textArea {color: red; background-color; blue}
TEXTAREA {color: inherit; background-color: transparent}

That seems to me to be nothing more than just another CSS hack, albeit not browser specific.

Received on Monday, 20 September 2010 11:58:53 UTC