Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Why scale-down mapped to contain? #9

Closed
ghost opened this issue Mar 30, 2016 · 5 comments
Closed

Why scale-down mapped to contain? #9

ghost opened this issue Mar 30, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 30, 2016

Hello

Why scale-down is only mapped to contain?

According to https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit:

scale-down
The content is sized as if none or contain were specified, whichever would result in a smaller concrete object size.

Can you add the none for scale-down?
Thank you.

@fregante
Copy link
Owner

Fixing it to follow the spec (and thus switching between none and contain) would mean having to calculate the image size at every resize. It's a bit costly but I'll consider it.

@ghost
Copy link
Author

ghost commented Mar 30, 2016

To begin, if this work only at the first display, it's good for me :)

@fregante
Copy link
Owner

Could you test this out and let me know how it works before I push it to npm?

@ghost
Copy link
Author

ghost commented Mar 31, 2016

Yeah :) For me, it works with IE 11 and Firefox 22. My little image is... little and my big image is resized. Thank you, good job!

@fregante
Copy link
Owner

Published to npm as 2.3.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant