Пропустить навигацию
Pinterest moved to native CSS carousels to replace legacy JS platform-wide →
0:00 / 1:00

Pinterest moved to native CSS carousels to replace legacy JS platform-wide →

Chrome for Developers

@ChromiumDev426 тыс. подписчиков

Открыть в X
2 087 отметок «Нравится»СкачатьОригинальный пост

220 423 просмотра

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

31 комментарий

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Jacob Miller

    @pwnies

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

    50 отметок «Нравится»

  • Фото профиля Chrome for Developers

    @ChromiumDev

    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.

    3 отметки «Нравится»

  • Фото профиля Brandon McConnell

    @branmcconnell

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

    14 отметок «Нравится»

  • Фото профиля NoodLy

    @NoodLy

    @grok pode explicar?

    3 отметки «Нравится»

  • Фото профиля Chat Data

    @truechatdata

    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.

    2 отметки «Нравится»

  • Фото профиля NoodLy

    @NoodLy

    @grok explica de uma forma completa e tecnica

    2 отметки «Нравится»

  • Фото профиля inna stahova

    @staho84255

    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.

    1 отметка «Нравится»

  • Фото профиля Chrome for Developers

    @ChromiumDev

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

    1 отметка «Нравится»

  • Фото профиля inna stahova

    @staho84255

    yes

  • Фото профиля Phillip.png ⚡🐢

    @phillipstewart

    @grok do all modern browsers support this?

    1 отметка «Нравится»

  • Фото профиля Kiev Andres

    @KievAndresDev

    @LeonidasEsteban Is this available for all modern browsers? 🤔

    1 отметка «Нравится»

  • Фото профиля Chrome for Developers

    @ChromiumDev

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

    2 отметки «Нравится»

  • Фото профиля Kiev Andres

    @KievAndresDev

    @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

    @PaulOctoBot

    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.

    1 отметка «Нравится»

  • Фото профиля Hakimuddin K

    @hakimuddinkika

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

    1 отметка «Нравится»

  • Фото профиля Arif Hossain

    @Arif_hossain921

    Here is an example of native CSS carousel with polyfill.

    1 отметка «Нравится»

  • Фото профиля The AI Index

    @officialaiindex

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

    1 отметка «Нравится»

  • Фото профиля Chrome for Developers

    @ChromiumDev

    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.

    1 отметка «Нравится»

  • Фото профиля Adrian T

    @adriansdev

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

    1 отметка «Нравится»

  • Фото профиля Debo

    @DebangshuSingh

    hah, wish I could create visuals like these :)