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

On 28/05/2012 04:57, John Daggett wrote:
> 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.

Whilst I quite strongly prefer my use of "distinguish" to the current 
use of "confusion", I'm happy to leave it to you to choose between the 
two proposals.

In your proposal, I don't think it's necessary to split the note off 
into a separate paragraph. ("Inline" notes are fine when they're only 
one sentence long, I feel.)

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Monday, 28 May 2012 08:06:03 UTC