W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css3][background] background-size as the background shorthand

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 04 Oct 2012 06:35:59 -0700
Message-ID: <506D90BF.5080908@inkedblade.net>
To: www-style@w3.org
On 10/03/2012 10:03 PM, Kyung-Tae Kim wrote:
> Hi all,
> 
> What I want to suggest is how about not to initialize background-size
> when the background shorthand doesn't include it.
> 
> The 'background-size' attribute was added to the background shorthand by CSS3 spec.
> (http://dev.w3.org/csswg/css3-background/#the-background)
> 
> Then, it was applied to the Webkit several months ago.
> (https://bugs.webkit.org/show_bug.cgi?id=27577)
> 
> However, many legacy sites set background-size first and then set background for setting other background attributes.
> In these cases, the 'background-size' is initiaized, and the backgrounds become weird.

Sounds like a WebKit-specific legacy problem. I don't think we should
make everyone else change just because WebKit had a bug. If the sites
in question were coded to the standard and tested across platforms,
this problem would not be showing up.

In general, WebKit should make sure that when it introduces a new
property that is defined to be set by a shorthand, even if that
property's values are not yet parsed as valid values of the shorthand,
it should still be reset by the shorthand. This is easy to forget,
so WebKit reviewers should be careful to check for that when approving
patches for new properties. (Same goes for other implementers, too,
of course.)

~fantasai
Received on Thursday, 4 October 2012 13:36:33 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT