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

Re: Question on parsing of "font" property

From: Ernest Cline <ernestcline@mindspring.com>
Date: Tue, 18 May 2004 22:22:35 -0400
Message-ID: <410-22004531922235765@mindspring.com>
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>
Cc: www-style@w3.org


> [Original Message]
> From: Boris Zbarsky <bzbarsky@MIT.EDU>
>
> Ernest Cline wrote:
> >>   font: 10px /2 Times;
>
> > The slash isn't a valid nmstart character so it looks like it wouldn't
> > get picked up by the tokenizer as the start of an identifier to be
> > stitched together with Times by the arcane rules of 'font-family'
>
> The rules of font-family are not really that arcane, as far as I can
see... the 
> definition of font-family just says that certain characters must be
escaped
> or quoted; '/' is not in the list.  Past that, as far as I can tell,
anything goes 
> for font-family.

The problem is with the grammar as given in CSS 2.1, it looks
like when the 'font' rule includes the slash to separate <font-size>
and <line-height> that the result is something which going strictly by
the tokenizer isn't tokenizable, so the rule must be invalid (with or
without the space before the /).  Either I'm missing something in the
grammar for the tokenizer or implementers have just been special
casing the 'font' and 'font-family' rules without regard for the official
tokenizer.  The only mention of '/' per se is in the rules for 'font' at a
point where it would be required to be paired with a <line-height>.

In any case, this does need to be tightened up, so that everything
can be tokenized according to rules for the tokenizer.
Received on Tuesday, 18 May 2004 22:22:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:30 GMT