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

Re: [css21] 'font-family' should disallow 'inherit' in font names more strictly

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 23 Apr 2012 18:41:34 -0700
Message-ID: <CAAWBYDCTbGRzgFPXe225yoStXbRy7EDQzv-z6cYrmQupm5GEew@mail.gmail.com>
To: www-style@gtalbot.org
Cc: www-style list <www-style@w3.org>
On Mon, Apr 23, 2012 at 6:36 PM, "Gérard Talbot" <www-style@gtalbot.org> wrote:
> Le Lun 23 avril 2012 17:55, Tab Atkins Jr. a écrit :
>> Right now, 2.1 says the following about using 'inherit' in a font name:
>>
>> # The keywords 'initial' and 'default' are reserved for
>> # future use and must also be quoted when used as
>> # font names.
>
> Huh,... it seems to me that you misquoted this. It is written:
>
> "
> Font family names that happen to be the same as a keyword value
> ('inherit', 'serif', 'sans-serif', 'monospace', 'fantasy', and 'cursive')
> must be quoted to prevent confusion with the keywords with the same names.
> "
> http://www.w3.org/TR/CSS21/fonts.html#font-family-prop

No, I quoted the *very next* sentence.

> By the way, we have one test on this:
>
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/font-family-rule-004.htm

Yes - all implementations pass that simple case.  These cases, though,
show different behavior across browsers:

font-family: inherit, bar;
font-family: foo, inherit;
font-family: inherit foo, bar;
font-family: foo inherit, bar;
font-family: foo, inherit bar;
font-family: foo, bar inherit;

I'm not sure exactly which are different and which are similar across
different browsers, but they should all be tested to ensure adequate
coverage.

~TJ
Received on Tuesday, 24 April 2012 01:42:23 GMT

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