正在加载视频...
视频加载失败
built-in carousel micro-interactions with css scroll-driven animation 🧑🍳 li { view-timeline: --item inline } li::scroll-marker { animation: grow linear both; animation-timeline: --item; } progressive enhancement for drag ↓
44,038 次观看 • 1 个月前 •via X (Twitter)
27 条评论

saw this pattern ↓ nice candidate for css ::scroll-marker + ::scroll-button combined with scroll animation (falls back to <button> 🤙)

Is there a modern carousel component/framework based on all this new tech??

could throw one together 🤙 never sure how much to include 🤔 have a few scroll demos that you can point an agent at too on my site (web component <draggable-scroll>) include: - drag (inertia) - cyclical - markers - buttons - animation no deps 🚀

ooeee this is wonderful 👨🍳

some of these new css things are so so useful 👷

This looks nice 😍

thanks! 🙏

Nice, if CSS Carousels are supported in all major browsers we will be able to build many carousels as we want.

all of the carousels! 😅

10+/10

Smooth and clean 👌

🙏🙏

Is Horizon theme's codebase a masterclass in using CSS over JS that we could point our LLM to and if no, why?

erm – it definitely has some cool things in there 💯 depends what you're looking for!

Developing a theme now and want to say to AI: "See how the CSS goat is doing it? Do that."

wait so this is *not* scroll-snap? RIP scroll-snap?

ha - there is still scroll-snapping 🙌 jus' combined with some of the newer things and scroll-padding to get the snap offset 🧐

never ceases to amaze

tryin' to get back into the groove 🙏

Oh cool! I was working on sth quite similar: and ran into 3 webkit (iOS18-iOS27) and 1 firefox bugs overflow-x: auto animation timeline firefox (nightly)

nice! 😎 yeah, this is why i always try to put a fallback in too. thanks for raising those! 🙏 the little detail where the dots scale out at the edges is a fun one to make, right? you kinda think about it like an invisible extended scrollport but with a container unit 🤓

absolutely… the timeline api is genius!

That is sick! It is one of those ‘I don’t know why I like it but it is perfect’, ironically for both user and dev.

This is beautiful

You always fascinate me with your css knowledge and creativity. Great one. ☝️

scroll-driven animations finally landing natively is the css feature i've wanted for a decade. carousels without a single line of javascript is the dream we kept faking with intersection observers

Simple and beautiful, as usual from you.
