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 14:59:01 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.58.0405191446450.2485@dhalsim.dreamhost.com>

On Wed, 19 May 2004, Boris Zbarsky wrote:
> Ian Hickson wrote:
>> Specifically, it is equivalent to:
>>    font-size: 10px;
>>    line-height: 2;
>>    font-family: Times;
> It's not clear to me why this is true.  Does the spec say that anywhere clearly?
> It seems that you're saying that as soon as a production matches the token
> stream the parser should go with it, unless something later makes it invalid?
> Note that the whitespace issue is a non-issue here, as you pointed out; I should
> have researched a bit more and not included it at all.  The processing of the
> token stream is the only question.

If the token stream is the only question, then why is there a question?
The two examples you gave have exactly the same token stream, no?

Or are you asking "if there is a '/' token after the font-size has been
parsed, how do you know that it is delimiting a line-height and is not
simply part of the font-family"? Assume <generic-family> cannot start with
a slash. The working group will probably discuss this issue in more detail
next week, but that is the solution I will be suggesting. It seems highly
unlikely that any font name is going to include a slash anyway...

Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 19 May 2004 10:59:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:13 UTC