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

[selectors] Clarification on :lang() with asterisks

From: Benjamin Poulain <benjamin@webkit.org>
Date: Tue, 02 Dec 2014 17:34:17 -0800
Message-ID: <547E6899.7090101@webkit.org>
To: "www-style@w3.org" <www-style@w3.org>
CC: Dhi Aurrahman <diorahman@rockybars.com>
Hi all,

Dhi Aurrahman is extending WebKit's :lang() selector to support the 
asterisk matching added in 

He has raised an issue that needs clarification:

It is possible to use asterisks in the argument of :lang() simply by 
escaping them in the identifier. For example, :lang(de-\*-DE) defines a 
valid identifier.

Such input is correct in RFC 4647 (http://www.ietf.org/rfc/rfc4647.txt), 
a single asterisk subtag is a wildcard in the range-matching algorithm 
(3.3.2 -> 3.A.).

So far so good, except for Example 31 in the CSS Draft, there is the 
sentence: "Note that asterisks are not allowed anywhere else in 
:lang()'s language range syntax: they only have meaning, and are 
therefore only allowed, at the beginning.".

I don't see any restriction to the language range syntax of RFC 4647 
anywhere else in the spec. I am not sure what the sentence means in the 
example, maybe the raw input instead of the language range?

-Can escaped asterisks be used for wildcard matching described by RFC 
4647? (IMHO, they should)
-Can we get that behavior clarified in the text?

Received on Wednesday, 3 December 2014 01:36:34 UTC

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