RESOLVED FIXED 28440
background-size: X treated as background-size: X X, not background-size: X auto
https://bugs.webkit.org/show_bug.cgi?id=28440
Summary background-size: X treated as background-size: X X, not background-size: X auto
Jeff Walden (remove +bwo to email)
Reported 2009-08-18 16:51:01 PDT
See URL.
Attachments
Reinstate -webkit-background-size and keep its behavior of using a copy of the first value; and change background-size to use 'auto' (15.44 KB, patch)
2009-10-26 15:21 PDT, mitz
bdakin: review+
mitz
Comment 1 2009-08-23 21:15:47 PDT
The draft <http://dev.w3.org/csswg/css3-background/#the-background-size> does say “If only one value is given the second is assumed to be ‘auto’”, but this sort of behavior doesn’t make much sense to me, especially given the behavior of background-repeat and the 4-value (top-right-bottom-left) properties, where missing values are filled in with specified values. If the spec isn’t going to change, we will need to fix this bug, but we will also have to undo the aliasing of -webkit-background-size to background-size and have the former maintain the current parsing. We also need to decide what to do about -webkit-mask-size.
Jeff Walden (remove +bwo to email)
Comment 2 2009-08-24 12:31:06 PDT
Interpreting as background-size: X auto does have the useful property that it produces an undistorted rendering. There doesn't seem to be a comparably obvious way to interpret background-repeat or any of the 4-value properties to produce a "good" rendering every time. The 4-values have an obvious symmetry argument for repeating that I think doesn't apply here as a general rule. Drawing without distortion seems the best default, to me, when the one specified value in general only has meaning in the context of all the other surrounding widths (and the aspect ratio of the image itself). I wasn't paying attention to www-style when the change was made, tho, so I have no idea what arguments were or were not presented in favor of this default.
mitz
Comment 3 2009-10-26 15:21:30 PDT
Created attachment 41905 [details] Reinstate -webkit-background-size and keep its behavior of using a copy of the first value; and change background-size to use 'auto'
mitz
Comment 4 2009-10-26 15:42:09 PDT
Note You need to log in before you can comment on or make changes to this bug.