Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-backgrounds] Add 'scale-down' to background-size #468

Open
jez9999 opened this issue Sep 13, 2016 · 2 comments
Open

[css-backgrounds] Add 'scale-down' to background-size #468

jez9999 opened this issue Sep 13, 2016 · 2 comments

Comments

@jez9999
Copy link

jez9999 commented Sep 13, 2016

This is for css-backgrounds-4 (I can't seem to add labels). Link to spec section:
https://drafts.csswg.org/css-backgrounds-4/

As evidenced by various threads like this one on StackOverflow:
http://stackoverflow.com/questions/21407466/css-background-size-contain-without-the-image-to-scale-up

Quite a few people (myself included) would like the functionality that background-size:contain provides, except that when the image is smaller than the container, it should not scale up. Perhaps we could add background-size:scale-down?

@zcorpan
Copy link
Member

zcorpan commented Sep 14, 2016

'object-fit' has a scale-down value with this behavior.
https://drafts.csswg.org/css-images-3/#the-object-fit

@zcorpan zcorpan changed the title [background-4] Add 'limit' to background-size [css-backgrounds] Add 'limit' to background-size Sep 14, 2016
@jez9999 jez9999 changed the title [css-backgrounds] Add 'limit' to background-size [css-backgrounds] Add 'scale-down' to background-size Sep 14, 2016
@jez9999
Copy link
Author

jez9999 commented Sep 14, 2016

Good point; I've updated the title to fit.

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

No branches or pull requests

2 participants