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

(12/04/24 14:02), John Daggett wrote:
> Tab Atkins Jr. wrote:
> 
>> 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.
>>
>> This isn't strict enough, and implementations do somewhat different
>> things around this.  See Kenny's email at
>> <http://lists.w3.org/Archives/Public/www-style/2012Apr/0080.html>
>> where he shows several differences in implementations, where some UAs
>> accept 'inherit' as part of a font-name, or even as an entire
>> font-name in some circumstances.
>>
>> We propose tightening this up, since there's no use-case for using
>> unquoted 'inherit' in a font name, to:

I am not in favor of this direction, but no strong opinion whatsoever.

> I really don't see why this is important.

That's true.

> Non-interoperable behavior for edge cases that will never occur in
> practice is undesirable but I don't think it warrants much
> attention.

Well, my interest is to archive my findings on a public list. I see the
following ways to handle this situation:

A. ignore it at all.
B. resolve it and put in a spec.
C. don't resolve it, put in a spec and mark it "undefined".
D. have a document about "boring known issues" and just put it in.

A. is pretty natural. I wouldn't say I like B. too much because it often
requires decisions that are more or less arbitrary. Given that C.
dilutes the spec and makes the spec unreadable, I think we should think
about doing something like D.

>>> The keywords 'initial' and 'default' are reserved for
>>> future use and must also be quoted when used _in_
>>> font names.
> 
> This is equally imprecise, it implies that only the keywords are
> quoted when what you mean to say is that font family names
> *containing* these keywords must be quoted.

Either that or

  | unquoted global keywords ('inherit', 'initial' and 'default') are
  | not allowed inside <family-name>.


I mentioned that I don't like this direction so my propose wording is

  | If the value of 'font-family' is a single global keyword
  | ('inherit', 'initial' and 'default'), UAs must not interpret it as
  | <family-name> but the meaning of the global keyword.

The implication is that 'font-family: foo, inherit' is still valid. This
follows IE9.


Cheers,
Kenny

Received on Tuesday, 24 April 2012 09:31:25 UTC