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

Re: [css3-values] (Un)Quoted User-Defined Values (was: [css3-font] unquoted font family names with whitespace)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 19 Mar 2012 09:00:33 -0700
Message-ID: <CAAWBYDB70V+bNuu2QwdjA_Ny8T1HgZaOXksDJEGVG-uZaQZwSA@mail.gmail.com>
To: Christoph Päper <christoph.paeper@crissov.de>
Cc: www-style CSS <www-style@w3.org>
On Mon, Mar 19, 2012 at 4:57 AM, Christoph Päper
<christoph.paeper@crissov.de> wrote:
> John Daggett:
>
>> 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.
>
> It’s not just font family names, though. Currently the CSS rules for string values are basically this:
>
> — Pre-defined keywords MUST NOT be quoted.
> — User-defined keywords MAY be quoted.
> — Some user-defined keywords MUST be quoted.

Ignoring font-family which is crazy, the rules are:

— Pre-defined keywords MUST NOT be quoted.
— Some user-defined keywords MUST be quoted.
— Some user-defined keywords MUST NOT be quoted.


> I think it would be simpler and would better match what authors think and instructors teach, if reduced to this rule of thumb:
>
> — Pre-defined keywords MUST NOT be quoted.
> — User-defined keywords SHOULD be quoted.
>
> Use that whenever dealing with authors, whereas for implementers the former rules remain.

There's enough legacy that I don't think I'd want to make this change.
 Avoiding quotes when unnecessary is a good thing, in general.  We
only require quoting when there would be ambiguity otherwise, or when
the "keyword" doesn't come from the user, but rather from some outside
source that isn't easily changeable and might not follow the CSS
identifier production.

~TJ
Received on Monday, 19 March 2012 16:01:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:52 GMT