Giter VIP home page Giter VIP logo

Comments (7)

 avatar commented on August 15, 2024

+1

from antimoderate.

kozleek avatar kozleek commented on August 15, 2024

+1

from antimoderate.

huwd avatar huwd commented on August 15, 2024

That's exactly what I'm looking for too, but how - this works by crawling the DOM and replacing the contents of an tag + the animation, right?

Can js crawl a separate CSS document and do the same?

from antimoderate.

whackashoe avatar whackashoe commented on August 15, 2024

@huwd yeah right now it replaces the src attribute, a similar thing would need to be done but for background image. the code would just set el.style.backgroundImage to what it would have set to src.

from antimoderate.

huwd avatar huwd commented on August 15, 2024

:) Thought I'd try and do a pull request but after some fiddling on codepen I realise I'm outta my depth.js

Is there any chance the solution you describe above could also work at passing in alternative sass variables? Using bourbon neat currently got my $tiny-res and $full-res setup, just need the javascript to swap em and trigger your animation

from antimoderate.

whackashoe avatar whackashoe commented on August 15, 2024

Ahah well thanks for trying 🐃

It definitely should if the js was implemented for bg image. I guess instead of using a data attribute then, it !might! make sense to pop the tiny-res into their own css classes and have the js read the tiny-res from them. That would also have the added benefit that you could cache that file for the images which would be pretty neat.

from antimoderate.

DannyFeliz avatar DannyFeliz commented on August 15, 2024

+1

from antimoderate.

Related Issues (15)

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.