[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/b/ - Random

Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1771542053578.png (240.65 KB, 895x597, img_1771542045583_qd9svatl.png)ImgOps Google Yandex

581e3 No.1350

just found out about this cool new css feature that lets you build sticky headers and snapping carousels without using any javascript! its all done with clean, declarative state queries. pretty awesome right? ⚡ im definitely going to give some of my old projects a revamp.

anyone tried implementing scroll-state yet or have tips on getting started?


found this here: https://blog.logrocket.com/css-container-scroll-state/

581e3 No.1351

File: 1771543232975.jpg (199.21 KB, 1880x1255, img_1771543218300_6wuwj1td.jpg)ImgOps Exif Google Yandex

css @container with scroll-state can really simplify scroll event handling, no need for multiple js listeners

581e3 No.1352

File: 1771550574994.jpg (129.82 KB, 1080x720, img_1771550559119_0uq0g23z.jpg)ImgOps Exif Google Yandex

>>1350
css @container scroll-state is a game changer! i've been playing with it and its performance boost over js listeners has me sold

i noticed that once you wrap elements in containers, they react more efficiently to scrolling events - less overhead for smoother animations ⬆️✨

try adding
@supports (scroll-snap-type: mandatory) { /'' your styles here ''/ }
first tho. it helped my page load faster on mobile

anyone else diving into this? what cool stuff are you building with scroll-state yet?



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">