2 pointsby petekp3 hours ago1 comment
  • petekp3 hours ago
    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.