W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css-style-attr][css3-namespace] Namespace prefixes in style attributes?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 16 Oct 2012 10:36:58 -0700
Message-ID: <CAAWBYDAGShY7CHz-voUSkgquZAnQe_zMcrT-bE4zo7khQ+C5hQ@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: WWW Style <www-style@w3.org>
On Tue, Oct 16, 2012 at 6:10 AM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> With the new, generalized attr() function from css3-values, CSS qualified
> names can appear not only in selectors but also in property declarations.
> These qualified names depend on prefix declared in @namespace rules.
> What prefix declarations should apply to style attributes? For example:
> <foo xmlns:xlink="http://www.w3.org/1999/xlink"
>      xlink:href="the_target.bar"
>      style="content: '[' attr(xlink|href) ']';"/>
> I see two possibilities:
> * None. As if the declarations were in an implicit stylesheet that has
>   no @namespace rule.
> * If the host language has namespace prefixes (like XML does), "inherit"
>   the namespace declarations from the element.
> Either are fine IMO, but this should be defined somewhere.

Right now the answer is the same as for querySelector() (where the
problem you mention already exists): no namespaces, your first option.

The rule in a style attribute doesn't have a parent stylesheet to
inherit namespaces from, so by direct implication, any namespace
prefixes you use are invalid.

Received on Tuesday, 16 October 2012 17:37:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:22 UTC