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

Re: [css2.1][css3-fonts] keywords in unquoted font family names

From: John Daggett <jdaggett@mozilla.com>
Date: Sun, 27 May 2012 19:57:04 -0700 (PDT)
To: Anton Prowse <prowse@moonhenge.net>
Cc: www-style list <www-style@w3.org>
Message-ID: <1864069199.22359294.1338173824995.JavaMail.root@mozilla.com>

Anton Prowse wrote:

> > Proposed:
> >    Unquoted font family names that happen to be the same as the keyword
> >    values 'inherit', 'default' and 'initial' or the generic font
> >    keywords ('serif', 'sans-serif', 'monospace', 'fantasy', and
> >    'cursive') do not match the '<family-name>' type. These names must
> >    be quoted to prevent confusion with the keywords with the same
> >    names. Note that 'font-family: Times, inherit' is therefore an
> >    invalid declaration, because 'inherit' in that position can neither
> >    be a valid keyword nor a valid font family name.
> 
> I like the normative first sentence, but I think the second sentence 
> should be bundled up with the non-normative note.  This would alleviate 
> my concern that it's not clear from the tone whether 'must' is an 
> authoring recommendation or a conformance requirement; does not quoting 
> result in an invalid value or merely "confusion"? (In reality, whether 
> or not it's invalid depends entirely on the value definition and the 
> global grammar/syntax etc, which is captured succinctly by the normative 
> first sentence.)
>
> I also think the last sentence (the example) doesn't tie in correctly 
> with the the first sentence, since it's not the /position/ of 'inherit' 
> that causes it not the be a valid font family name; rather, it's the 
> fact that it isn't quoted.

I don't really agree with you here, I think both the context of the
'must' is fine and I think the example in the third sentence is simply
saying that 'inherit' is valid but 'foo, inherit' is not.  Before
'foo, inherit' could have been interpreted as matching <family-name>,
which was part of the ambiguity.

> I suggest:
> 
>    | Unquoted font family names that happen to be the same as the keyword
>    | values 'inherit', 'default' and 'initial' or the generic font
>    | keywords ('serif', 'sans-serif', 'monospace', 'fantasy', and
>    | 'cursive') do not match the '<family-name>' type.
>    |
>    | Note: These names must be quoted to distinguish them from the
>    | keywords with the same names.  For example, the declaration
>    | 'font-family: Times, inherit' is invalid because 'inherit' is
>    | interpreted as the keyword, resulting in an invalid value.

However, if you think splitting the proposed text into two paragraphs
to distinguish the normative requirement from the authoring note, I'm
fine with your tweak of this.

Regards,

John Daggett
Received on Monday, 28 May 2012 02:57:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT