W3C home > Mailing lists > Public > www-style@w3.org > September 2013

[css-syntax] Reverting <unicode-range> changes from CSS 2.1

From: Simon Sapin <simon.sapin@exyr.org>
Date: Sun, 01 Sep 2013 16:43:48 +0100
Message-ID: <522360B4.5050204@exyr.org>
To: www-style <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, John Daggett <jdaggett@mozilla.com>
Hi,

The Syntax ED had a some changes to the <unicode-range> token from CSS 
2.1 where it tried to make the syntax closer to what @font-face accepts, 
parse a numeric range as soon as in the tokenizer, and do some range 
normalization.


I just "reverted" these changes, and wrote a definition that matches CSS 
2.1’s idea of what <unicode-range> is:

https://dvcs.w3.org/hg/csswg/rev/dec8752a6390#l3.1

Instead of a numeric range, <unicode-range> tokens now have a "start" 
and an optional "end", each made of one to six code points. Parsing this 
into a numeric range is left to the Fonts spec (the only one where 
<unicode-range> is ever valid,) which it already defines.


Reasoning:

* This makes Syntax agnostic to the exact treatment of <unicode-range> 
in the Fonts spec. For example, Fonts recently changed to make ranges 
ending outside of Unicode invalid instead of clipping them. Compare:

http://www.w3.org/TR/2013/WD-css3-fonts-20130212/#unicode-range-desc
http://www.w3.org/TR/2013/WD-css-fonts-3-20130711/#unicode-range-desc

* Yes, CSS 2.1’s definition is silly and allows invalid ranges such as 
U+1?5-300, but changing it does not buy us anything. It’s fine to have 
absurd input be valid at the Syntax level and rejected by a given 
property/descriptor/selector/etc.


Cheers,
-- 
Simon Sapin
Received on Sunday, 1 September 2013 15:44:14 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:31 UTC