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

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 UTC