anselmh / object-fit

Polyfill (mostly IE) for CSS object-fit property to fill-in/fit-in images into containers.
MIT License
996 stars 92 forks source link

Min-/max- properties not applied #9

Closed joeyhoer closed 9 years ago

joeyhoer commented 10 years ago

One of the benefits of object-fit is the ability to apply a min-/max- height/width to an object and have the object fit the constrained dimensions. This works in browsers that natively support object-fit, but it does not work with the polyfill.

Initially I thought it might be related to https://github.com/anselmh/object-fit/blob/master/src/polyfill.object-fit.core.js#L54-L60. However that does not seem to be the case.

OliverJAsh commented 10 years ago

:+1:

anselmh commented 10 years ago

Thanks for the feedback. I think that’d be a great feature to support in future. If you have an idea and want to contribute I’m happy to review your pull request. Otherwise I try to implement this into the next version…

anselmh commented 10 years ago

So, an update here. As we try to emulate the behavior mostly CSS only this won’t be possible with our current code. If you have an idea how we could do it, I’m happy to discuss with you and help implement it.

anselmh commented 9 years ago

I’m closing this now. Don’t see an easy solution for it and bloating it up even more is no option for the sake of performance. Sorry.