Re: Background image cropping

> On Jun 10, 2014, at 7:40 AM, Dirk Schulze <dschulze@adobe.com> wrote:
> 
> I believe Mozilla has a -moz-image-rect() [1] image function that clips the input image argument. It is not specified though.

If just like to point out that the rect() syntax is horrible. Authors know where the rectangle's top left corner should start, and how wide and tall it should be. Forcing us to add those numbers to get offsets from a single point, instead of just  putting them in directly (as with media fragments), is very annoying. 

I think something like image-rect() could be useful, to live alongside MF, but I'd want it to be x, y, width, height. 

I'd also like a 'crop' property that used offsets from the 4 edges (shorthand for crop-top, crop-right, crop-bottom, crop-left). 'Crop' would not really be for spriting (it would be for when you wanted to crop in on the edges of an element, like you would in an image editor), but it is related. 

Received on Wednesday, 11 June 2014 16:00:21 UTC