- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 12 Feb 2015 12:30:31 +0400
- To: "www-style@w3.org" <www-style@w3.org>, "Benjamin Poulain" <benjamin@webkit.org>
On Tue, 10 Feb 2015 09:22:02 +0400, Benjamin Poulain <benjamin@webkit.org> wrote: > 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? It seems slightly annoying to remember what kind of token was used. Would it be compatible to serialize as an identifier if possible without escaping, and otherwise as a string? Or some other rule like escape as a string only if there is an asterisk? -- Simon Pieters Opera Software
Received on Thursday, 12 February 2015 11:31:18 UTC