What's edge masking and what am I looking at? I clicked through several of the options and I don't see any difference. There just seems to be a really basic gradient shadow.<p>I have gpu enabled in google chrome (verified by visiting chrome://gpu) on Chrome/149.0.7827.155 on Linux.
It took me forever to realize this, but I'm pretty sure the "options" ("ghost", "melt", "evanesce", and so on) aren't anything at all, just terms that are all adjacent to "fade" which can be selected for some reason. A search for those terms in the repo doesn't come up with anything.<p>I was really hoping to see what the "melt" effect looked like :(
The fade affects scroll bars, which is quite unpleasant (and arguably catastrophic if you have two-dimensional scrolling). The traditional background-image technique avoided this by sitting inside the scroll area. I don’t think you can achieve that with mask, without an additional element. But I think it might be worth that extra element.
Really nice! Nice to see FF Nightly already has support that enables scroll detection.
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.<p>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.<p>demo site: <a href="https://pete.design/tw-fade" rel="nofollow">https://pete.design/tw-fade</a><p>github: <a href="https://github.com/petekp/tw-fade" rel="nofollow">https://github.com/petekp/tw-fade</a><p>npmjs: <a href="https://www.npmjs.com/package/tw-fade" rel="nofollow">https://www.npmjs.com/package/tw-fade</a><p>if you use it i'd love to hear how it goes and if you have any feedback.
This is extremely laggy on my computer. It may not be a top-end gaming supercomputer but it's no slouch either.
It's fine on my phone, Brave Android. Maybe it doesn't work on Firefox?
It might be related to the liquid glass imitation in the color scheme picker
What is happening here and why is it special? The site itself does show, but does not tell (which in itself is somewhat refreshing).
This is an effect that is widely used but is generally done with JS.<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.<p>CSS effects tend (<i>tend</i>) to be faster and conceptually is a better place for effects anyway (e: and works with JS disabled, which is cool)
I also love the pure CSS parallax effect of the "tw-fade" title shadow using multiple spans with different styles that fade in and out based on scroll position. Very clever!
FYI scrolling this page is slow as balls on my computer. Firefox on Ubuntu.<p>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.<p>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?
This has a frame drop issue on Chrome Version 149.0.7827.156. It isn't close to smooth on my browser.
How it works: <a href="https://github.com/petekp/tw-fade#how-it-works" rel="nofollow">https://github.com/petekp/tw-fade#how-it-works</a>
Neat! I'd much rather just copy-paste the CSS from the site though, would never install something like this as a package.
[dead]
arrow keys don't work, pgdown doesn't work
I don't think that would be an issue of this CSS, that's just normal `overflow: auto` behaviour.
pgdown works for me (firefox on linux)<p>arrow keys also seem to work fine but you have to click-to-focus first.