[selectors] Improving the definition of language range in :lang()

Hi,

Dhi is making progress toward the implementation of :lang() and it 
becomes clear that the definition of language range in the CSS spec 
makes things complicated in practice.

There was already the problem of using asterisk in the range like 
previously mentioned 
(http://lists.w3.org/Archives/Public/www-style/2014Dec/0046.html).

A new problem we are running into is the filtering with subtags composed 
of numbers. For example, the language tag "de-CH-1996" cannot be 
filtered by the valid language range "*-1996" because the definition in 
the spec defines the range as an identifier preceded by an asterisk, and 
-1996 is not a valid CSS identifier.

I believe it might be better to use the definition from RFC 4647 
directly instead of creating a new definition for CSS. This would be 
simpler than trying to retrofit CSS identifiers into language ranges.

We will continue the implementation with the current CSS definition but 
feedback is welcome.

Benjamin

Received on Tuesday, 9 December 2014 00:45:05 UTC