Re: Extend use of namespaces

On Sat, Sep 18, 2010 at 10:36 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> You lost me with the blanket statement.  I do want to style <svg:a> and
> <html:a> differently sometimes, so we need a solution for that.  Since they
> differ only in their namespace (and fully qualified name, of course), we
> need a way to match on either namespace or fully qualified name.  I wish it
> weren't so, but if CSS is going to be useful for styling HTML5 documents
> that include SVG, MathML, and such, then it needs this capability.

<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).  If
it was just author or user stylesheets, you could get away with

textarea, svg html textarea, svg html html textarea { ... }
svg textarea, svg svg textarea, svg svg svg textarea { ... }

or something, for practical purposes.  But that's not acceptably
robust for UA stylesheets, I'd think.

Ideally, SVG would have done like MathML and deliberately avoided
naming conflicts with HTML.  Too late for that now, though.
Redefining a few prefixes like "svg", "math" (or "mathml"?), and
"html" sounds like a good idea, though.

Received on Monday, 20 September 2010 00:30:44 UTC