W3C home > Mailing lists > Public > www-style@w3.org > September 2008

Re: [css3-background] lookahead and 'background' shorthand parsing

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 15 Sep 2008 11:42:59 +0200
To: "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
Message-ID: <op.uhinxxl764w2qv@annevk-t60.oslo.opera.com>

On Mon, 15 Sep 2008 00:39:57 +0200, L. David Baron <dbaron@dbaron.org>  
> I noticed that in the parsing of the 'background' shorthand in
> http://dev.w3.org/csswg/css3-background/#background1 , the parsing
> requires two token lookahead, which current CSS parsing rarely, if
> ever, requires.  In particular, when a '/' is encountered, it's not
> possible to tell whether that '/' is the delimiter in the middle of
> the background-color or whether it's the beginning of the
> background-size without looking at the next token:
>   background: blue / black; /* background-color */
>   background: blue / cover; /* background-color background-size */
> One way to solve this would be to require 'background-position' in
> order to specify 'background-size'.
> (It's possible we could decide it's worth the complexity, although I
> wouldn't be too happy about that.)

I thought we decided that background-size would be enclosed by parenthesis  
in the background shorthand. The various examples reflect this, but the  
grammar apparently does not. (No idea what WebKit supports here though.)

Anne van Kesteren
Received on Monday, 15 September 2008 09:43:38 UTC

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