W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css21][css3-font] unquoted font family names with whitespace

From: Anton Prowse <prowse@moonhenge.net>
Date: Sun, 20 May 2012 19:32:20 +0200
Message-ID: <4FB92AA4.5060207@moonhenge.net>
To: www-style@w3.org
CC: Simon Pieters <simonp@opera.com>, John Daggett <jdaggett@mozilla.com>
On 19/03/2012 06:32, Simon Pieters wrote:
> On Mon, 19 Mar 2012 01:01:09 +0100, John Daggett <jdaggett@mozilla.com>
> wrote:
>> Simon Pieters wrote:
>>> > Unquoted family names must be sequences of CSS identifiers, in both
>>> > CSS 2.1 and CSS3 Fonts. So you're right, family names don't need to
>>> > be quoted but I still think recommending quotes is a good rule of
>>> > thumb, it avoids authors needing to understand precisely what is and
>>> > isn't a "sequence of CSS identifiers" (the spec does show several
>>> > examples of invalid names).
>>> In that case the spec should recommend to always use quotes for font
>>> family names. I'm fine with that outcome, but I'm not so happy with
>>> the current text.
>> No, I'm not suggesting (nor does the spec suggest) that family names
>> *always* be quoted, either as a requirement or as a rule of thumb.
>> Authors have quoted names in the past because browsers didn't always
>> support names with spaces. With user agents that follow the CSS 2.1
>> rules, names only need to be quoted when they aren't a sequence of CSS
>> identifiers. But since authors are human and don't keep parsing rules
>> at their fingertips, I think it's fine to suggest a rule of thumb.
>> Maybe it's not some shining ideal but it works in practice.
> Removing the mention of whitespace would make the rule of thumb simpler.
>>> > In real world use, this is rarely a problem. Font family names may
>>> > have spaces but typically don't start with numbers or use punctuation
>>> > characters. Yes, I'm sure there are exceptions out there but they
>>> > generally aren't used on the web or in interchange situations (e.g.
>>> > email).
>>> Still, many authors quote their font family names if they have spaces
>>> (and
>>> omit the quotes if they don't), because that's what they have been
>>> told to
>>> do.
>> That's because of spotty implementation support in the past.
> Ah. Well then, surely it's safe to change the recommendation now to be
> more accurate and not mention whitespace.

(Regarding CSS21, I agree with John's sentiment expressed earlier in 
this thread that this should not be considered for errata.  The 
recommendation was sensible for the era to which CSS21 belonged.)

Anton Prowse
Received on Sunday, 20 May 2012 17:33:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC