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

Re: [css3-images] Reintroduce object-fit: none

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 24 May 2011 10:33:40 -0700
Message-ID: <BANLkTikiViwCciZWT4UyoUM+3WR-tydpAQ@mail.gmail.com>
To: Leif Arne Storset <lstorset@opera.com>
Cc: www-style@w3.org, Philip Jägenstedt <philipj@opera.com>, "Simon Pieters (zcorpan)" <simonp@opera.com>
On Tue, May 24, 2011 at 4:36 AM, Leif Arne Storset <lstorset@opera.com> wrote:
> Tab Atkins Jr. <jackalmage@gmail.com> skreiv Tue, 24 May 2011 02:06:39
> +0200
>> On Thu, Jan 27, 2011 at 2:35 PM, fantasai <fantasai.lists@inkedblade.net>
>> wrote:
>>> On 01/27/2011 09:18 AM, Tab Atkins Jr. wrote:
>>>> Ok, so I'm hearing some good justifications for both 'cover' and
>>>> 'none' (and I think 'scale-down' has similar nice justifications).
>>> I'm still unsure about 'none'. The use case Leif has given is
>>> panning the image, and in that case you'd probably want more than
>>> just the ability to pan at 100% zoom level. If that's the use case
>>> we're addressing, we should add percentages or something.
>> 3) Add the 'none' value.  The stronger use-case here seems to be
>> panning a "window" over a portion of a larger image, a la Google Maps.
>>  A somewhat weaker imo use-case is vertically centering an image; I
>> think this should be addressed by a more general centering mechanism
>> like Flexbox.
> We already have a more general centering/positioning mechanism:
> 'object-position', implemented by HP and Opera. However, for it to work
> without scaling the image, we need 'object-fit: none'. 'scale-down' comes
> close, but doesn't address cases such as the following:
> (From my former life as a web developer for www.neitileu.no:) You are
> writing style sheets for a site with many content producers. The site
> includes a fixed-size banner, but after a while you want to adjust the
> design and shave a few pixels off the banner. But you want to avoid
> scaling, as that will deform and blur or alias the text, and this is more
> important than losing a few edge pixels. A demo is at [0].

Can't you just edit the image?  Or was it common that you'd reuse the
same logo in several places, and you only want the marginally-smaller
size in some of the places?

> Another case is a screenshot gallery, similar to Opera's speed dial
> feature: You have a series of screenshots for the user to choose from,
> presented in thumbnail form. You want the screenshots unscaled but evenly
> sized. A screenshot from my speed dial is at [1].

Similar question here.  Why can't you just take a screenshot and crop
it to the necessary size?  I don't feel like switching over to my
windows box to test Opera - are the speed dial boxes variable-width?

> [0]
> http://people.opera.com/lstorset/demos/object-fit/dont-liek-scaling/deformed-vs-object-fit-none.html
> [1]
> http://people.opera.com/lstorset/demos/object-fit/dont-liek-scaling/speed-dial.png
> ([0] and [1] will also be sent to www-archive.)

Received on Tuesday, 24 May 2011 17:34:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC