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

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 UTC