cee-chen / object-fit-polyfill

A Javascript polyfill for browsers that don't support the object-fit CSS property.
ISC License
496 stars 93 forks source link

added class to wrapper on polyfill #3

Closed bdbch closed 8 years ago

bdbch commented 8 years ago

@constancecchen I added a class on the polyfilled items so they can be optimized when the item is polyfilled by the script.

bdbch commented 8 years ago

@constancecchen please make sure to add your object-fit-images to bower via

bower register

cee-chen commented 8 years ago

Hey hey - sorry for a bit to get back to you!

The changes look solid in terms of code review :) My main question about the CSS class addition is that I'm not entirely sure what the practical use case is. It definitely doesn't hurt, but I'm wondering if you have an example of an in-use scenario where it's necessary to override what the polyfill's already doing via inline CSS?

bdbch commented 8 years ago

@constancecchen I had the problem, that the plugin overwrite some position: value because I didn't defined a position before. this broke my view so I tried to overwrite it.

Anyway, even if I could have fixed it another way, I think it makes sense to add classes to items we edit via the polyfill because it doesn't hurt the page itself and also makes it more customizable (for example, if you need some css fix for images using the polyfill you can just do that with this css class).

cee-chen commented 8 years ago

Cool, that works for me - thanks for taking the time to explain! :D