Best of CSS-TricksDecember 2025

  1. 1
    Article
    Avatar of css_tricksCSS-Tricks·20w

    Prevent a page from scrolling while a dialog is open

    Chrome 144 introduces a fix for preventing page scrolling when modal dialogs are open by extending overscroll-behavior to work on non-scrollable containers. By setting overscroll-behavior: contain on both the dialog element and body, and making the dialog a scroll container with overflow: hidden, developers can now solve this long-standing issue without JavaScript workarounds that previously required fixing body positioning.

  2. 2
    Article
    Avatar of css_tricksCSS-Tricks·18w

    Masonry Layout is Now grid-lanes

    The CSS Working Group has officially decided on `display: grid-lanes` as the syntax for triggering masonry layout in CSS. After years of debate starting in 2017, the CSSWG resolved to reuse grid templating and placement properties for masonry. All major browsers (Chrome, Safari, Firefox) had already implemented experimental versions with different syntaxes but are now working on switching to `grid-lanes`. The feature is not yet available in stable browsers, but implementation work is underway across all major browser engines.

  3. 3
    Article
    Avatar of css_tricksCSS-Tricks·20w

    HTML Web Components Proposal From 1998

    Web components have roots dating back to a 1998 W3C proposal that introduced the concept of componentization for building applications using reusable building blocks. The proposal emphasized breaking down complex applications into manageable chunks without requiring deep understanding of internal implementation details. While often perceived as a recent feature, the idea of style encapsulation and component-based architecture has been evolving for nearly 30 years in web development history.

  4. 4
    Article
    Avatar of css_tricksCSS-Tricks·19w

    What Else Could Container Queries… Query?

    Container queries have evolved beyond simple size queries to include scroll-state queries, anchored container queries, and potentially many more types. The article explores current container query capabilities including detecting scrollability, sticky positioning, and anchor position fallbacks. It discusses future possibilities like querying any CSS property value, detecting element wrapping or ellipsing, counting child nodes, and determining flex/grid positions. The author predicts container queries will become increasingly versatile, potentially offering dozens of query types similar to how media queries have expanded.