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

I apologize for the imprecise wording of the resolution. I thought just mentioning the word "comma" would be enough to remind people what needed to be clarified. I hadn't expected so much confusion. :-(

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.


>> div {font-family: bar inherit, foo, serif;} /* still valid */
> 
> invalid

No, still valid. Same case as above: the font name is "bar inherit", which doesn't need quoting.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Sunday, 6 May 2012 18:35:05 UTC