Re: Image sprites use cases

On Sat, Aug 29, 2009 at 3:07 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> (I'll note quickly that my favorite, and I think generally the best
> solution, is the one being created by the Media Fragments WG where
> they're defining one form of hash on links to image files.  Using frex
> "image.png#xywh=0,40,20,20" would select a 20x20 region, starting on
> the left edge, 40px from the top.


The problem with that approach is that it doesn't degrade gracefully for
browsers without the feature.

We've just landed a feature on Gecko trunk for image values of the form
-moz-image-rect(image.png,0,40,20,20), which does allow graceful
degradation, e.g.
background: url(image-small-05.png);
background: -moz-image-rect(image.png,0,40,20,20);

But we may need to add some other feature to support Alex's use case.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]

Received on Sunday, 30 August 2009 23:21:25 UTC