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

[cssom] Serializing the :lang() pseudo class

From: Benjamin Poulain <benjamin@webkit.org>
Date: Mon, 09 Feb 2015 21:22:02 -0800
Message-ID: <54D9957A.7000901@webkit.org>
To: "www-style@w3.org" <www-style@w3.org>
Hi,

The serialization of :lang() just says to append "The escaped value.".

In Selectors Level 4, :lang() takes a list of identifiers and strings.

When we implemented :lang() in WebKit, we serialized each language range 
to the same format as its original input. For example :lang(foo, 
"*-bar") remains :lang(foo, "*-bar").

The reason to use string for serialization is the escaped asterisk is 
hard to work with when the string is converted to an identifier. 
Initially we wanted to convert every language range to string but we ran 
into compatibility issues since the argument used to be only an identifier.

Could this be clarified in the spec?

Benjamin
Received on Tuesday, 10 February 2015 05:23:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC