Re: [CSS21] Errata to disallow 'inherit' after comma in 'font-family'

On Sun, May 6, 2012 at 11:34 AM, Bert Bos <bert@w3.org> wrote:
> On May 3, 2012, at 07:32, fantasai wrote:
>> On 05/02/2012 12:43 PM, "GĂ©rard Talbot" wrote:
>>> div {font-family: foo, bar inherit, serif;} /* now invalid */
>>
>> yes
>
> No, there is not supposed to be any change to the spec, only a clarification for an ambiguous case. This case was already clear and does not change.
>
> The font name here is "bar inherit" which is not the same as "inherit" and thus doesn't need quotes.
>
> It's only when 'inherit' occurs on its own that there is an ambiguity in the spec. The spec says that "inherit" in
>
>    font-family: foo, inherit, serif
>
> is *not* a font name, because if it were, it would have been quoted. That implies it is the 'inherit' keyword. But the spec also implies that 'inherit' can only occur as the whole value of the property. And so there is a conflict that needs to be clarified.
>
> That clarification is that the above example is an invalid declaration: an identifier 'inherit' that occurs in place of a <family-name> makes the declaration invalid.

In order to reach the point where you're saying "The font-name is 'bar
inherit'.", you first have to pass through the point where you say "I
see the keyword 'inherit' in that property, and it's not the sole
value!".  That's the part that's invalid in every single other
property in CSS.  font-family is definitely weird, but there's no good
reason to make that weirdness violate the rule here.  It's not like
fonts named "bar inherit" are somehow more likely than fonts named
just "inherit", after all.

I can say with certainty that this is *precisely* what fantasai and I
were intending when we brought this issue before the group.  There was
absolutely no confusion in our minds, though it appears we
communicated sufficiently poorly that other people got confused about
what we were asking about.

~TJ

Received on Sunday, 6 May 2012 19:03:51 UTC