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

Re: [css3-images] Features Overview

From: Lev Solntsev <greli@mail.ru>
Date: Fri, 06 May 2011 21:58:07 +0400
To: www-style@w3.org
Message-ID: <op.vu2mu5ij39dhqv@lev-pc>
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 GMT

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