GithubHelp home page GithubHelp logo

Comments (6)

petripottonen avatar petripottonen commented on June 30, 2024

Looks good man!

from object-fit.

anselmh avatar anselmh commented on June 30, 2024

Won’t do this. All solutions that reimplement the CSSOM are massively bloated and it’s not worth pulling in 50 additional kb of code for a simple one property polyfill. Therefore closing this for the time being.
I might be able to come up with whole different solution.

from object-fit.

FremyCompany avatar FremyCompany commented on June 30, 2024

FWIW, I think the optimal solution is to run most of the CSSOM stuff on the CSS as part of the grunt process (or via node.js), and generate a companion js file for each css, and add only a very small client-side library (querySelectorLive / polyfillStyleInterface / ...) to handle the dynamic behavior.

I would be glad to work on this, but I ran out of time and motivation. If you feel like it would solve your use case, we could probably team up to work on this. If you had something else in mind, I'm curious about what do you plan to do.

from object-fit.

anselmh avatar anselmh commented on June 30, 2024

Hm, thanks for the input, @FremyCompany. Currently I’m on a very tight schedule so I can’t put a lot of effort in here over the next weeks. It would be great indeed if we could use the base for polyfills and only get a fraction and small part of the whole code in production.
I’m not yet sure it would solve my use case but the performance issues in this polyfill currently are based on parsing the whole CSS through getmatchedrules etc.

from object-fit.

FremyCompany avatar FremyCompany commented on June 30, 2024

Okay, I'll try to schedule this at some point. It's not really I need help, it's more like I need some motivation to prioritize this over other stuff ^_^ I think I agree with you the solution I have now is more for dev than for production.

Btw, you didn't reply: what's the solution you plan to use now? Do you already know?

from object-fit.

anselmh avatar anselmh commented on June 30, 2024

Ah sorry. No I don’t have a real plan what I’ll use. I might try out to provide the object-fit behavior through SVG but I haven’t tested this though don’t know if that works. And it would be for SVG supporting browsers only then.

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.