Closed joeyhoer closed 9 years ago
:+1:
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…
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.
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.
One of the benefits of
object-fit
is the ability to apply amin-/max-
height/width
to an object and have the object fit the constrained dimensions. This works in browsers that natively supportobject-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.