Git Product home page Git Product logo

Comments (4)

anselmh avatar anselmh commented on June 26, 2024

Hey, the polyfill accepts all options of querySelectorAll() which means you can also chain CSS selectors in it, comma-separated.

Please be aware that the polyfill still needs to travel up the whole DOM to match parent styles on it as well which is a performance issue but lets it act properly. It might be the case that when you have a large CSS file and use this polyfill, IE might still crash, even when you limit the selectors.

from object-fit.

anselmh avatar anselmh commented on June 26, 2024

Oh by the way, can you add your setup (IE version, MS version) and the size of your CSS just for the record, please?

from object-fit.

sonicpunk avatar sonicpunk commented on June 26, 2024

Thanks for getting back to me. Our minified CSS is 201 KB, tested on Windows 8, IE11. Even with using the selectors, the performance is a no good.

from object-fit.

anselmh avatar anselmh commented on June 26, 2024

Yes, I assumed this already. 200kb of CSS is very heavy and it definitely is the reason that the browser hangs during the polyfills’ execution. Maybe you could go with SVG wrapper using the preserveAspectRatio trick which is at least similar to the object-fit behavior?
The polyfill won’t ever solve this performance problem as in that case it would lack much of the original behavior – making it useless as a "polyfill".

from object-fit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.