- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 15 Mar 2012 07:35:34 +0100
- To: Gérard Talbot <www-style@gtalbot.org>
- Cc: "www-style mailing list" <www-style@w3.org>
On Wed, 14 Mar 2012 19:26:13 +0100, Gérard Talbot <www-style@gtalbot.org> wrote: > > Le Mer 14 mars 2012 2:52, Simon Pieters a écrit : > > Simon, > > I have modified the subject line as this is CSS21 material. > >> Unescaped unquoted font family names that start with a digit or contain >> punctuation characters other than hyphen will break *even if there is no >> whitespace*. > > " > For example, the following declarations are invalid: > > (...) > font-family: Hawaii 5-0, sans-serif; > " > http://www.w3.org/TR/CSS21/fonts.html#font-family-prop > > > The font-family name Hawaii 5-0 contains 1 white space and 1 hyphen and > it > is invalid. But it's not invalid because of the whitespace or the hyphen. It's invalid because one of the tokens start with a number. > >> Suggested wording: >> >> To avoid mistakes in escaping, it is recommended to quote font family >> names that contain words that start with digits or contains punctuation >> characters other than hyphens: > > > If an unescaped unquoted font-family name starts with an hyphen followed > by a digit, then it will be invalid syntax. If it starts with 2 hyphens, > it should be invalid. You're right, it could be more accurate. > >> >> body { font-family: "Amalgamate O (outlined)", serif } >> >> <BODY STYLE="font-family: '21st Century', fantasy"> >> >> -- >> Simon Pieters >> Opera Software > > I think the punctuation characters themselves should be listed, otherwise > a few of them, the most common ones: !, #, /, -, @, ?, $, etc Yeah, that's fine. The apostrophe is a character I've seen in font names which may be useful to call out as well. > Gérard -- Simon Pieters Opera Software
Received on Thursday, 15 March 2012 06:36:19 UTC