Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 7 месяцев назад •via X (Twitter)

Комментарии: 31

Фото профиля Jacob Miller
Jacob Miller7 месяцев назад

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

Фото профиля Chrome for Developers
Chrome for Developers7 месяцев назад

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.

Фото профиля Brandon McConnell
Brandon McConnell7 месяцев назад

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

Фото профиля NoodLy
NoodLy7 месяцев назад

@grok pode explicar?

Фото профиля Chat Data
Chat Data7 месяцев назад

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.

Фото профиля NoodLy
NoodLy7 месяцев назад

@grok explica de uma forma completa e tecnica

Фото профиля inna stahova
inna stahova7 месяцев назад

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.

Фото профиля Chrome for Developers
Chrome for Developers7 месяцев назад

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

Фото профиля inna stahova
inna stahova7 месяцев назад

yes

Фото профиля Phillip.png ⚡🐢
Phillip.png ⚡🐢7 месяцев назад

@grok do all modern browsers support this?

Фото профиля Kiev Andres
Kiev Andres7 месяцев назад

@LeonidasEsteban Is this available for all modern browsers? 🤔

Фото профиля Chrome for Developers
Chrome for Developers7 месяцев назад

@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.

Фото профиля Kiev Andres
Kiev Andres7 месяцев назад

@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! 🔥

Фото профиля Paul
Paul7 месяцев назад

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.

Фото профиля Hakimuddin K
Hakimuddin K7 месяцев назад

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

Фото профиля Arif Hossain
Arif Hossain7 месяцев назад

Here is an example of native CSS carousel with polyfill.

Фото профиля The AI Index
The AI Index7 месяцев назад

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

Фото профиля Chrome for Developers
Chrome for Developers7 месяцев назад

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.

Фото профиля Adrian T
Adrian T7 месяцев назад

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

Фото профиля Debo
Debo7 месяцев назад

hah, wish I could create visuals like these :)

Фото профиля AI Dynamo aka Elon Wiki aka Elon's Guru
AI Dynamo aka Elon Wiki aka Elon's Guru7 месяцев назад

@grok Native CSS is here

Фото профиля Ty Zhao
Ty Zhao7 месяцев назад

save stuff locally instead of pinterest on

Фото профиля zaw min
zaw min7 месяцев назад

I'm very see.

Фото профиля Souhail Marghabi
Souhail Marghabi7 месяцев назад

@0xGorri

Фото профиля HuBrowser
HuBrowser7 месяцев назад

nice

Фото профиля Deokhyun
Deokhyun7 месяцев назад

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

Фото профиля Chrome for Developers
Chrome for Developers7 месяцев назад

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.

Фото профиля Gogo | Azurox
Gogo | Azurox7 месяцев назад

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

Фото профиля Abbos Nurgulshanov
Abbos Nurgulshanov7 месяцев назад

@teqqed

Фото профиля Josho Evancer
Josho Evancer7 месяцев назад

Hey... See

Фото профиля sprintfPython
sprintfPython7 месяцев назад

true industry got scammed by these middleware bloats in code

Похожие видео