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 21:52:18 -0400
Message-ID: <410-2200453191521862@mindspring.com>
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>, www-style@w3.org


> [Original Message]
> From: Boris Zbarsky <bzbarsky@MIT.EDU>
>
> I was asked what the right parsing of the following CSS is:
>
>    font: 10px /2 Times;
>
> (note the space before the '/'), and it seems to me that this could be 
> parsed as either:
>
>    font-size: 10px;
>    font-family: /2 Times;
>
> or
>
>    font-size: 10px;
>    line-height: 2;
>    font-family: Times;
>
> Both look to be valid, no?

I'm not 100% certain, but I think that only the second one is valid..
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'
into something that would be equivalent to:
	font-family: "/2 Times";
Received on Tuesday, 18 May 2004 21:52:19 GMT

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