W3C home > Mailing lists > Public > www-style@w3.org > June 2014

Re: Background image cropping

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 11 Jun 2014 08:59:51 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Lajos Koszti <ajnasz@ajnasz.hu>, www-style list <www-style@w3.org>
Message-Id: <132BA763-2E4F-4ECE-B9B5-8F368E5CBFD2@gmail.com>
To: Dirk Schulze <dschulze@adobe.com>

> 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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC