jQuery: Explore replacing effects with CSS transitions#156
jQuery: Explore replacing effects with CSS transitions#156dmsnell wants to merge 1 commit intonitrogen:rebar3from
Conversation
d9c785f to
eac8e0d
Compare
|
I like where you're going with this! I agree that the drawbacks are hardly drawbacks. One thing that I'm not opposed to is integrating with some lighter-weight jquery-like libraries that abstract some of the manual work away. Like https://github.com/fabiospampinato/cash or https://github.com/kylebarrow/chibi for example. Maybe it's just my jquery-reliant-old-man-mind-who-doesn't-like-change, but the idea of having to Then again, maybe I should just get over it. Do you have an opinions on this? I've never used modern frontend frameworks like angular and react so I don't know how the kids do things these days with JS, so I'm open to ideas. |
well this is literally changing
in short there's a tendency to move things out of heavy frameworks like jQuery. jQuery will always hold a special place in web dev because it covered all sorts of browser inconsistencies and deficiencies in the JavaScript standard library. for the most part, all of that has been resolved, whereas browsers provide a fairly universal interface for operating on for things like animations and effects jQuery is again just a really heavy framework that didn't keep up with needs, especially for mobile devices where power efficiency is more important. the move to CSS can offload most of the visual effects onto a GPU and can be significantly easier on a battery, even to the point where similar pages with jQuery might warm up a phone. so overall the move is towards efficiency and and embracing the platform, which has improved greatly since jQuery became dominant. the use of Angular and React are addressing a much different part of the process, which is more like what |
Status
It's plausible that we could use the existing framework and reinterpret
#jquery_effect. The stateless CSS transitions are relatively straightforward (fade/appear), while the stateful ones require more thought (toggle).Benefits
styleattribute from jQuery's timer-based callbacksif_visible()checks necessary, when looking at CSS vs. JS for effectsDrawbacks