Re: [cssom] CSSNamespaceRule

On 19/03/2014 14:48, Daniel Glazman wrote:
> On 19/03/14 00:08, Tab Atkins Jr. wrote:
>
>>>> Sure I want all rules to be affected. Again, the scenario is the
>>>> following one: a html document contains an embedded stylesheet. I'm
>>>> adding a SVG image I want to style. I need to add a namespace rule
>>>> to the existing stylesheet to style my SVG. I can't. This is a blocker
>>>> for all conforming editing environments.
>>>
>>> Sorry for giving a non-solution, but you *could* just ignore namespaces when
>>> styling SVG elements, just like everyone usually does for HTML elements.
>>> (Without a default namespace, type selectors select elements with a given
>>> local name in any namespace.)
>>
>> That's a perfectly valid solution for the web; there are only four
>> name collisions between SVG and HTML, and they're all *basically* the
>> same element except for <font>, and you shouldn't be using <html:font>
>> anyway.  MathML doesn't have any name collisions, I think.
>
> My editor does not only edit for the dynamic web. It allows all flavors
> of html, including xhtml for EPUB where namespaces are needed.

I don’t understand. Type selectors without a namespace prefix nor a 
default namespace declarations select elements in any namespace. As far 
as I know that doesn’t change in XHTML or EPUB.

Or are there cases where this is ambiguous and you really need to select 
in a specific namespace?

-- 
Simon Sapin

Received on Wednesday, 19 March 2014 07:12:26 UTC