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

Re: set <bg-size> in 'background' shorthand property, syntax of forward slash '/'

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 20 Jan 2011 09:30:39 -0800
Cc: <www-style@w3.org>
Message-Id: <56C61D2A-1408-498F-AEA6-F2065DE5EC17@gmail.com>
To: "tao.yu@nokia.com> <tao.yu@nokia.com" <tao.yu@nokia.com>, "fantasai (fantasai@inkedblade.net)" <fantasai@inkedblade.net>

On Jan 20, 2011, at 7:36 AM, <tao.yu@nokia.com> <tao.yu@nokia.com> wrote:

> Hi,
>  
> I was looking at the CSS3 Backgrounds & Borders spec for ‘background’ shorthand property. The <bg-layer> syntax is:
>  
> <bg-layer> = <bg-image> || <bg-position> [/ <bg-size>]? || <repeat-style> || <attachment> || <box>{1,2}
>  
> My question here is: if <bg-size> is specified (via a forward slash ‘/’), should it follow a valid <bg-position> immediately?
>  
> Two examples (Example XV & XVI) in spec NOT set <bg-size> after <bg-position> immediately, like Example XVI:
> E { background: #CCC top left url("metal.jpg") / 100% auto no-repeat}
> Is this correct?
>  
> Thanks,
> -Tao

The <bg-position> is required if you specify <bg-size> in the shorthand. This was a big argument for a while, and was resolved in the April 2010 face-to-face meeting:

fantasai: Disallow "/size position", definitely.
fantasai: Allow "position url /size" and "/size url position"?
fantasai: Or restrict it to *only* "position/size"?
RESOLVED: Change background shorthand to have "<bg-position> [/ <bg-size>]".
           (Position is required if you specify size.)

http://lists.w3.org/Archives/Public/www-style/2010Apr/0273.html

So, based on all that, it looks like "position url /size" is not allowed, and the examples do need updating.
Received on Thursday, 20 January 2011 17:31:14 GMT

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