Tw-fade: pure CSS scroll-driven edge masking
pete.design
pete.design
I have gpu enabled in google chrome (verified by visiting chrome://gpu) on Chrome/149.0.7827.155 on Linux.
I was really hoping to see what the "melt" effect looked like :(
Perhaps some or all of them don't work in Firefox for Android, and I'm just seeing a fallback behavior that does work?
Edit: Just tested in Chrome desktop and Firefox desktop on Linux, still struggling to see a difference in any of the demo regions (which I assume are supposed to demo the option when selected?). Also scroll behavior is graphically laggy/jumpy in Chrome, but not Firefox.
Since this problem bothers me every time I see it on the web, I put together a quick example:
works in pretty much all browers excepting firefox which doesn't have CSS scroll animations yet, but the nightly version does, so it should be generally available soon.
demo site: https://pete.design/tw-fade
github: https://github.com/petekp/tw-fade
npmjs: https://www.npmjs.com/package/tw-fade
if you use it i'd love to hear how it goes and if you have any feedback.
edit: the scrubber split animation is dope too!
Clicking the different options and then scrolling horizontally or vertically does not change any behaviour, appearance or animation.
My understanding is that something should change in the occluded elements that are partially outside the scroll area.
There are still other issues though. The performance of this page feels pretty bad in general.
I don't know if this page is a demonstration of your plugin, I'm guessing yes but I can't see any masking going on, it seems to scroll just like a normal page but much more laggy.
EDIT: Oh I see in your comment now, it doesn't work in Firefox. My mistake.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...
The effect indicates to users who may not have scroll bars enabled that a box can be scrolled. The fade should be removed when a box can’t be scrolled in that direction.
CSS effects tend (tend) to be faster and conceptually is a better place for effects anyway (e: and works with JS disabled, which is cool)
Why on earth would it be a big deal not to use JS for this. Even a frost effect has been demoed in CSS.
Of course nowadays you don't need the png.
I mouse over the horizontal section and everything starts blinking and jittering wildly, then disappears. Vertical section has same issue.
arrow keys also seem to work fine but you have to click-to-focus first.