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

Re: [css2.1][css3-fonts] keywords in unquoted font family names

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 21 May 2012 18:24:06 -0700 (PDT)
To: Bert Bos <bert@w3.org>
Cc: www-style list <www-style@w3.org>
Message-ID: <1686908496.18634159.1337649846664.JavaMail.root@mozilla.com>

Bert Bos wrote:

> > On the telcon a few weeks ago there was a discussion about
> > situations like these:
> >
> >  font-family: foo, inherit;
> >
> > I don't actually see how the present wording explictly makes
> > 'inherit, foo' invalid but not 'foo, inherit'.  Specifically, I'm
> > not sure I see an implicit priority in the grammar productions
> > that distinguish 'foo, inherit' from 'inherit, foo'.
> 
> I agree, there is no ambiguity in the current wording. 'font-family:
> inherit' is the keyword inherit; and 'font-family: foo, inherit,
> bar' is invalid, because the font name "inherit" must be quoted.
> 
> But even if it is unambiguous, it is apparently not clear. Otherwise
> different implementers wouldn't have implemented it differently.

To be clear, I think the present syntax is ambiguous because it
doesn't provide clear details on the priority of the implied
productions within the grammar.  My point above was simply that if
'inherit, foo' is invalid than 'foo, inherit' should also be invalid.
Specifically, user agents always need to prioritize matching ident+
first, then the 'inherit' keyword.  This is different from other
syntax involving identifiers where keywords are matched with higher
priority.  In this case, the keywords 'inherit', 'default' and
'initial' need to explicitly not match <font-family> to be able to
infer this priority.

> > 1. Correct the syntax to fix the placement of the comma:
> >
> > Existing:
> >   font-family: [[<family-name> | <generic-family>] [, <family-name>| <generic-family>]* ] | inherit
> >
> > Proposed:
> >   font-family: [[<family-name> | <generic-family>] [, [<family-name>| <generic-family>]]* ] | inherit
> 
> Interesting that nobody found that error before. It was correct in
> the first REC. The error was introduced in the first WD of the
> revised edition, in 2002...

Actually, √ėyvind from Opera pointed this out during the F2F [1].

Regards,

John

[1] http://lists.w3.org/Archives/Public/www-style/2012May/0414.html
Received on Tuesday, 22 May 2012 01:25:01 GMT

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