Re: Question on parsing of "font" property

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 UTC