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

Re: [css3-background] Nitpick on interpretation of one keyword+offset in background-position

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 07 Jan 2010 10:44:06 -0800
Message-ID: <4B462B76.1010804@inkedblade.net>
To: Řyvind Stenhaug <oyvinds@opera.com>
CC: "www-style@w3.org" <www-style@w3.org>
On 01/07/2010 03:03 AM, Řyvind Stenhaug wrote:
> On Thu, 07 Jan 2010 02:37:31 +0100, fantasai
> <fantasai.lists@inkedblade.net> wrote:
>
>> On 01/06/2010 09:19 AM, Řyvind Stenhaug wrote:
>>> The current text says "If two values are given and at least one value is
>>> not a keyword, then the first value represents the horizontal position
>>> (or offset) and the second represents the vertical position (or
>>> offset)". There are a couple of cases where this is nonsensical, since
>>> one can have
>>>
>>> <bg-position> = [ top | bottom ] [ <percentage> | <length> ]
>>>
>>> (e.g. "background-position: top 10px"), where the first value clearly
>>> can't represent the horizontal position.
>>
>> That combination is forbidden by the property's value grammar:
>> http://www.w3.org/TR/css3-background/#the-background-position
>> (This restriction is inherited from CSS2 and cannot be changed.)
>
> As far as I can see the grammar does allow it. Drill down three times
> taking the second option each time and (after omitting the question
> mark) you get what I cited above. It's part of the fourth line (and the
> double bar doesn't need both options to be present).

Ugh, you're right. I've tried to fix it in the editor's draft,
let me know if it's correct:
   http://dev.w3.org/csswg/css3-background/#the-background-position

~fantasai
Received on Thursday, 7 January 2010 18:44:45 GMT

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