- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 20 May 2013 22:45:18 -0700
- To: John Daggett <jdaggett@mozilla.com>
- Cc: www-style list <www-style@w3.org>
On Mon, May 20, 2013 at 9:48 PM, John Daggett <jdaggett@mozilla.com> wrote: > fantasai wrote (regarding the @font-face rule unicode-range descriptor): >> # Without any valid ranges, the descriptor is omitted. >> >> I disagree with this. If there aren't any valid ranges, >> the range should be the null set, not *everything*. > > I think there are a couple reasons why this isn't a good idea. I > spec'ed the behavior above because it's roughly equivalent to the > handling of properties with invalid values: > > font-style: italic; > font-style: whizzy; /* invalid value, font-style: italic used */ > > Ignoring a descriptor when the ranges aren't valid allows future > syntax to be added in a way that an author can also include descriptor > declarations for older user agents. > > For example, if we decide to add a way to specify named ranges to > unicode-range: > > unicode-range: u+3000:ffff; /* all kana/kanji */ > unicode-range: range(jis1); /* using new syntax, just the JIS1 subset */ > > User agents that understood the 'range()' function would use that > definition while older user agents would use the first one. > > I think the existing definition is in better keeping with CSS > traditions and the expectations of authors. Agreed. The entire concept of invalid unicode-range tokens exists only because someone was lazy with the regex defining their syntax; they should always be parse errors when used. The Syntax spec gets rid of this and only recognizes valid ranges. (You can define an empty range if the start is greater than the end, but that's fine. John currently marks those as invalid but only drops them from the list rather than dropping the whole declaration, which is roughly identical to just leaving them be and giving them an empty range.) ~TJ
Received on Tuesday, 21 May 2013 05:46:04 UTC