- From: Martin Atkins <mart@degeneration.co.uk>
- Date: Thu, 05 Feb 2009 13:39:41 -0800
- To: www-style@w3.org
Faruk Ateş wrote: > > You make a good point; perhaps it would be more useful to have this > sprite syntax: > > background-image: sprite(x-start, y-start, x-end, y-end[, url(path)]); > > With the fifth parameter having to be set only once if desired. > I like the functionality this affords, but it seems inconsistent with how "shorthands" (which is effectively what this is) work with inheritance elsewhere in the language. Here's another thought: selector { sprite-image: url(some_image); background-image: sprite(x1, y1, x2, y2); } However, it seems that neither proposal works all that well when there are multiple background images, as is allowed in CSS3 Backgrounds and Borders. My proposal also suffers when sprite() is used for other image-accepting properties such as list-style-image, since it becomes impossible to use a separate sprite for each. (and I think list-style-image is an important use-case, since it seems that many times I've used background images to fake list-style-image so that I could use the sprite technique.)
Received on Thursday, 5 February 2009 21:40:18 UTC