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

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

From: Bert Bos <bert@w3.org>
Date: Sun, 6 May 2012 20:34:39 +0200
Message-Id: <DED79A39-6158-4208-A9B7-C3AA15AE0A5E@w3.org>
To: W3C style mailing list mailing list <www-style@w3.org>
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 GMT

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