W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: Extend use of namespaces

From: Paul Duffin <pduffin@volantis.com>
Date: Mon, 20 Sep 2010 05:58:19 -0600 (MDT)
To: Anne van Kesteren <annevk@opera.com>
Cc: www-style <www-style@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>, Aryeh Gregor <Simetrical+w3c@gmail.com>
Message-ID: <224324972.21334.1284983899602.JavaMail.root@zimbra.volantis.com>


----- 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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT