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

Re: Extend use of namespaces

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Tue, 21 Sep 2010 15:16:02 -0400
Message-ID: <AANLkTi=E3V1q-bru229g7vFpH1U1dLCTZxPckDSD22N5@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>, Anne van Kesteren <annevk@opera.com>
Cc: www-style <www-style@w3.org>
On Sun, Sep 19, 2010 at 8:54 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 9/19/10 8:29 PM, Aryeh Gregor wrote:
>>
>> 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
>
> <svg:a> and <html:a> have totally different content models and rendering
> models.  For example, while it's possible to style <html:a> via color and
> background doing that on an <svg:a> doesn't get you what you want at all;
> fill-color and stroke-color are more likely to be what's wanted there.
>
>> so the author shouldn't care which parts are SVG and which parts HTML.
>
> Except for the little caveat about totally different box models....

Well, okay, I stand corrected.  (I really have to actually learn SVG
at some point.  :) )

>> 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.
>
> It's not acceptable for user sheets either, nor in my opinion for author
> sheets.

You're already forced to do stuff like this anyway in some cases.  For
instance, if you want to alternate between three styles of bullets for
<ul>,

ul li { list-style-type: disc }
ul ul li { list-style-type: square }
ul ul ul li { list-style-type: circle }
ul ul ul ul li { list-style-type: disc }
ul ul ul ul ul li { list-style-type: square }
ul ul ul ul ul ul li { list-style-type: circle }
ul ul ul ul ul ul ul li { list-style-type: disc }
ul ul ul ul ul ul ul ul li { list-style-type: square }
ul ul ul ul ul ul ul ul ul li { list-style-type: circle }

After that, oh well, it stops working right.  But it probably won't
come up much.  Ideally we'd have some way to select this kind of thing
properly, but it does work in practice, IMO.  (Although I don't know
of examples offhand.)

On Mon, Sep 20, 2010 at 7:45 AM, Anne van Kesteren <annevk@opera.com> wrote:
> Actually, the DOM and CSS are only case-insensitive for elements in the HTML
> namespace. So you can select match textArea just fine.

But you still can't select only html:textarea and not svg:textArea
without using namespace selectors, right?

(But never mind, this is a fairly pointless tangent -- namespaces are
here to stay.)
Received on Tuesday, 21 September 2010 19:16:55 GMT

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