Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Pinterest moved to native CSS carousels to replace legacy JS platform-wide → Using CSS primitives like scroll markers and snap, they achieved: 📉 90% code reduction (2k JS → 200 CSS) 🚀 15% faster page loads ✨ Smoother, interactive UI

220,423 Aufrufe • vor 7 Monaten •via X (Twitter)

31 Kommentare

Profilbild von Jacob Miller
Jacob Millervor 7 Monaten

Their carousel implementation isn't what I want native, it's this bad boy. Give us that sweet sweet display: grid-lanes!

Profilbild von Chrome for Developers
Chrome for Developersvor 7 Monaten

It’s actively being worked on! Microsoft is adding the feature to Chromium. They are sweating the details to make sure the implementation is feature complete and spec compliant. ETA TBD.

Profilbild von Brandon McConnell
Brandon McConnellvor 7 Monaten

dope! what are they using to polyfill for safari and firefox?

Profilbild von NoodLy
NoodLyvor 7 Monaten

@grok pode explicar?

Profilbild von Chat Data
Chat Datavor 7 Monaten

This is the kind of frontend progress people underestimate. Replacing custom JS with browser primitives usually buys you three things at once: less code to maintain, fewer edge-case bugs, and better runtime behavior. The 90 percent reduction is wild.

Profilbild von NoodLy
NoodLyvor 7 Monaten

@grok explica de uma forma completa e tecnica

Profilbild von inna stahova
inna stahovavor 7 Monaten

As far as I know, you still can’t make a looped (infinite) carousel with pure CSS where you can seamlessly swipe/scroll straight from the last slide directly to the first one.

Profilbild von Chrome for Developers
Chrome for Developersvor 7 Monaten

That is correct at the moment. Is this something you would like to see in the future?

Profilbild von inna stahova
inna stahovavor 7 Monaten

yes

Profilbild von Phillip.png ⚡🐢
Phillip.png ⚡🐢vor 7 Monaten

@grok do all modern browsers support this?

Profilbild von Kiev Andres
Kiev Andresvor 7 Monaten

@LeonidasEsteban Is this available for all modern browsers? 🤔

Profilbild von Chrome for Developers
Chrome for Developersvor 7 Monaten

@LeonidasEsteban This is Chromium (Chrome, Edge, Brave) only … but the feature is part of the css-overflow-5 specification, so other browsers can implement it over time. People can resort to feature detection to provide alternatives in browsers with no support.

Profilbild von Kiev Andres
Kiev Andresvor 7 Monaten

@LeonidasEsteban Got it! Thanks for clarifying. It's always exciting to see these new CSS capabilities landing in Chromium first. Looking forward to implementing this with proper fallbacks! 🔥

Profilbild von Paul
Paulvor 7 Monaten

2k lines of JS replaced by 200 lines of CSS. The best code is the code you delete. Native web platform keeps closing the gap on frameworks.

Profilbild von Hakimuddin K
Hakimuddin Kvor 7 Monaten

So people are moving towards plain vanilla as the frameworks get bloated

Profilbild von Arif Hossain
Arif Hossainvor 7 Monaten

Here is an example of native CSS carousel with polyfill.

Profilbild von The AI Index
The AI Indexvor 7 Monaten

Browsers are eating UI logic, less JS glue, more native primitives, this shifts complexity from apps into the platform layer

Profilbild von Chrome for Developers
Chrome for Developersvor 7 Monaten

Spot on. Shifting that complexity down to the platform layer means the browser engine can optimize it at the C++ level, pushing animations and scrolling directly to the compositor thread.

Profilbild von Adrian T
Adrian Tvor 7 Monaten

Nice! What about RAM usage on this? One other thing people would probably like to see is more RAM optimization.

Profilbild von Debo
Debovor 7 Monaten

hah, wish I could create visuals like these :)

Profilbild von AI Dynamo aka Elon Wiki aka Elon's Guru
AI Dynamo aka Elon Wiki aka Elon's Guruvor 7 Monaten

@grok Native CSS is here

Profilbild von Ty Zhao
Ty Zhaovor 7 Monaten

save stuff locally instead of pinterest on

Profilbild von zaw min
zaw minvor 7 Monaten

I'm very see.

Profilbild von Souhail Marghabi
Souhail Marghabivor 7 Monaten

@0xGorri

Profilbild von HuBrowser
HuBrowservor 7 Monaten

nice

Profilbild von Deokhyun
Deokhyunvor 7 Monaten

The real win is shrinking the surface area, not just cutting JS.

Profilbild von Chrome for Developers
Chrome for Developersvor 7 Monaten

Exactly! Swapping a heavy JS carousel for native CSS scroll-snap doesn't just save bytes over the wire, it completely removes that entire execution surface from the main thread.

Profilbild von Gogo | Azurox
Gogo | Azuroxvor 7 Monaten

Is native drag on desktop in scope for improvement? It has been a deal breaker on multiple project for adoption to replace Swiper

Profilbild von Abbos Nurgulshanov
Abbos Nurgulshanovvor 7 Monaten

@teqqed

Profilbild von Josho Evancer
Josho Evancervor 7 Monaten

Hey... See

Profilbild von sprintfPython
sprintfPythonvor 7 Monaten

true industry got scammed by these middleware bloats in code

Ähnliche Videos