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

Re: Question on parsing of "font" property

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 19 May 2004 22:13:41 +0000 (UTC)
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, www-style@w3.org
Message-ID: <Pine.LNX.4.58.0405192206150.2591@dhalsim.dreamhost.com>

On Wed, 19 May 2004, Andrew Fedoniouk wrote:
>
> declaration
>   : property ':' S* expr prio?
>   | /* empty */
>   ;
> expr
>   : term [ operator term ]*
>   ;
> term
>   : unary_operator?
>     [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |
>       TIME S* | FREQ S* | function ]
>   | STRING S* | IDENT S* | URI S* | hexcolor
>   ;
>
> operator
>   : '/' S* | COMMA S* | /* empty */
>   ;
>
> following this we are getting rule for a non quouted font names:
>
> font-name: IDENT S* [, IDENT S* ]*

Where did IDENT come from? The spec specifically says that any valid CSS
construct is allowed, including blocks, etc.

   font-family: url(bla)  3em  /;

...is valid; it's the same as:

   font-family: "url(bla) 3em /";

Whether this is a good thing or not is up for discussion but that's what
CSS1 said and now we're stuck with it.

(Admittedly the grammar in CSS2.1 doesn't match this. That's an error in
the grammar. I've noted it.)

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 19 May 2004 18:13:43 GMT

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