W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: [selectors-nonelement] ::attr(*|localname), ::attr(ns|*), and ::attr(*)

From: Simon Pieters <simonp@opera.com>
Date: Wed, 26 Feb 2014 14:01:11 +0100
To: "Jirka Kosek" <jirka@kosek.cz>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "Simon Sapin" <simon.sapin@exyr.org>, www-style <www-style@w3.org>
Message-ID: <op.xbv3r9wcidj3kv@simons-mbp>
On Wed, 26 Feb 2014 11:45:03 +0100, Jirka Kosek <jirka@kosek.cz> wrote:

> On 26.2.2014 11:20, Simon Pieters wrote:
>> The latter is probably more interesting.
>
> For example if you want to override default HTML5 rules for translatable
> attributes
> (http://www.w3.org/TR/html5/dom.html#translatable-attributes), it's
> easiest to switch translatability of all attributes first by the
> following rule:
>
> <its:translateRule selector="::attr(*)" translate="no"/>
>
> Then you can selectively enable translation of selected attributes only  
> by:
>
> <its:translateRule selector="::attr(title), ::attr(alt)"  
> translate="yes"/>

Thanks. This supports the inclusion of '*' in the first place, so that's  
good.

For this use case it doesn't matter if '*' includes all attributes or only  
all attributes in no namespace, since the listed attributes are all in no  
namespace.

-- 
Simon Pieters
Opera Software
Received on Wednesday, 26 February 2014 13:01:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC