Re: [css3-images] Features Overview

fantasai wrote:

>      background-image: url('swirl.png'); /* old UAs */
>      background-image: image('sprites.png#xywh=10,30,60,20'); /* new UAs  
> */
>
>    http://dev.w3.org/csswg/css3-images/#url

IMHO, "xywh" keyword is ugly. Since using hash notation in image URL is  
already deprecated, how about replacing it with  
"image('sprites.png#crop=10,30,60,20')" or even something like  
"image-crop('sprites.png',10,30,60,20)"?

In latter case you even can omit crop sizes so

     background-image: image-crop('sprites.png',10,30);

will be equivalent to

     background-image: url('sprites.png');
     background-position: -10px -30px;

for older browsers which can be used for example with "star" sprites:  
http://chikuyonok.ru/u/ss12.png

Received on Friday, 6 May 2011 17:58:33 UTC