Live data from Hacker News

Tw-fade: pure CSS scroll-driven edge masking

pete.design

1–10 of 37 posts

Re: Tw-fade: pure CSS scroll-driven edge masking

#2
hey all, just released a plugin to scratch an itch. i'd been lazily adding linear gradients on the edges of scrollviews and animating them with JS based on scroll position. turns out you can do a lot better with pure CSS now by leveraging masking + the new CSS scroll animations API.

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.

Re: Tw-fade: pure CSS scroll-driven edge masking

#3
FYI scrolling this page is slow as balls on my computer. Firefox on Ubuntu.

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.

Re: Tw-fade: pure CSS scroll-driven edge masking

#4
post #3

FYI scrolling this page is slow as balls on my computer. Firefox on Ubuntu. 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.

This has a frame drop issue on Chrome Version 149.0.7827.156. It isn't close to smooth on my browser.

Re: Tw-fade: pure CSS scroll-driven edge masking

#10
post #3

FYI scrolling this page is slow as balls on my computer. Firefox on Ubuntu. 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.

I was wondering the same thing and I'm in Chrome. The "Horizontal" and "Vertical" sections don't seem to do anything, but maybe I'm just not understanding what I should be looking for?
Post reply on HN