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

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 UTC