W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: CSS3 background-position

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 7 Jan 2010 09:20:45 -0800
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org
Message-Id: <3DAEBC39-DEBE-4909-BDAE-DB787F2184BA@gmail.com>
To: Yves Lafon <ylafon@w3.org>

On Jan 7, 2010, at 5:01 AM, Yves Lafon wrote:

> And when you need to read the spec to figure out in which direction the offset in "center 10px top 10px" is taken into account.

I wasn't involved in this part of the spec really, but that's a parsing error, isn't it? The spec says this:

#If three or four values are given, then each <percentage> or<length> represents an offset and must be preceded by a keyword, which specifies from which edge the offset is given. 

You've got four values, and each one is preceded by a keyword, so 'top 10px' clearly means 10px from the top. But 'center' does not indicate the edge for the offset, and is prevented by the following, which says you can have 'center' by itself (or left or right  by themselves), OR a keyword/measure combination that does NOT include 'center':

[ center | [ left | right ] [ <percentage> | <length> ]?

Received on Thursday, 7 January 2010 17:21:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:23 GMT