Close Menu
    Latest Post

    Is ChatGPT’s New Shopping Research Solving a Problem, or Creating One?

    January 9, 2026

    How GitHub Engineers Address Platform Challenges

    January 9, 2026

    Key CSS Developments: Conditional View Transitions, Text Effects, and Community Insights

    January 9, 2026
    Facebook X (Twitter) Instagram
    Trending
    • Is ChatGPT’s New Shopping Research Solving a Problem, or Creating One?
    • How GitHub Engineers Address Platform Challenges
    • Key CSS Developments: Conditional View Transitions, Text Effects, and Community Insights
    • As RAM prices skyrocket and Windows 11 flounders, Linux gains native NVIDIA GeForce NOW support — turning the cloud into a sanctuary for priced-out gamers
    • Honor Magic 8 Pro: A Contender in the Flagship Smartphone Arena
    • United States Withdraws from International Cybersecurity Organizations
    • Lego Introduces Tech-Enhanced Smart Bricks Amidst Expert Concerns
    • Build Resilient Generative AI Agents
    Facebook X (Twitter) Instagram Pinterest Vimeo
    NodeTodayNodeToday
    • Home
    • AI
    • Dev
    • Guides
    • Products
    • Security
    • Startups
    • Tech
    • Tools
    NodeTodayNodeToday
    Home»Dev»What Else Could Container Queries Query?
    Dev

    What Else Could Container Queries Query?

    Samuel AlejandroBy Samuel AlejandroDecember 21, 2025Updated:December 22, 2025No Comments5 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    src 8b6yfm featured
    Share
    Facebook Twitter LinkedIn Pinterest Email

    When container queries first arrived in 2022, their significance was not immediately apparent to everyone. Questions arose about the necessity of container size queries when media queries were already available, and the utility of container style queries given that custom properties inherit (though they do not yet work with standard properties). Their initial use cases seemed to replicate existing functionalities in a different manner.

    Here is a demonstration of container size queries by Kevin Powell. It is worth noting that all major browsers support size queries in this example, but other demonstrations in this article might require the latest Chrome.

    A demonstration of container style queries, utilizing the new range syntax:

    More recently, additional types of container queries have emerged.

    Container Scroll-State Queries

    Container scroll-state queries introduced unique capabilities, allowing detection of whether a container is scrollable, snapped to a scroll target, or has ‘position: sticky’ and is currently ‘stuck’. As of this writing, Chrome has announced scrolled support, which differs slightly from scrollable.

    A demonstration of container scroll-state queries by Geoff Graham:

    And there are even more developments.

    Anchored container queries

    The latest feature in container queries is anchored container queries. These enable querying fallback positions. For instance, if a tooltip caret is anchor-positioned to the left of a tooltip, but insufficient space requires flipping the tooltip to the opposite side using ‘position-try-fallbacks: flip-inline’, an anchored container query can detect this flip. This allows the tooltip caret to also be flipped to the opposite side of the tooltip, maintaining visual consistency.

    What else?

    This raises the question: what are the full capabilities of container queries? With dozens of media queries available, it is worth considering if container queries could also expand significantly. What potential applications could they have?

    Get any computed value

    Recent explorations into methods for obtaining and utilizing CSS property values highlighted container size queries, as they unlock container query units. Developers might even define a wrapper element as a container solely to access these units.

    <parent> {
      /* Gimme container query units! */
      container-type: inline-size;
    
      <child> {
        width: 100cqi;
      }
    }

    While container queries might have a verbose syntax for simply retrieving values, their versatility is evident. As an alternative, a CSS function named ‘compute()’ was suggested. This function could allow developers to retrieve a property’s value from another element, for example:

    <parent> {
      <child> {
        /* Computed height of <child> */
        property: compute(height, self);
        /* Computed height of the parent */
        property: compute(height, inherit);
        /* Computed height of #abc element */
        property: compute(height, #abc);
      }
    }

    Such a function would eliminate the need for a container size query just to use its container query units and would apply to all properties. Furthermore, a container size query would not provide the un-computed declared value that was originally typed. For this, the ‘inherit()’ function has been proposed, and Roma demonstrates its use in Chrome Canary.

    The keyword approach is also appealing, with a desire for more keywords similar to currentColor (e.g., currentBackgroundColor has been proposed).

    Extending container queries to retrieve the value of any CSS property would offer immense flexibility, making the ability to pass properties and values between elements highly desirable.

    Query any CSS property

    This capability has been considered since container style queries were first proposed, though its arrival date remains uncertain. This enhancement to container style queries would allow querying the (un-computed/declared) value of any CSS property, not just custom properties (though retrieving and using these values might not be possible, as far as current understanding goes).

    Does querying any CSS property render other container queries redundant? Not entirely.

    Container scroll-state queries detect snapping and stickiness, states for which no pseudo-classes currently exist (though perhaps they should). They also detect scrollability, as ‘overflow: scroll’ or ‘overflow: visible’ only indicates permission to scroll, not actual content overflow. Anchored container queries, on the other hand, do not query the ‘position-try-fallbacks’ value; instead, they detect when, for example, the position-area is flipped.

    These specialized queries perform distinct functions, meaning the upgrade for container style queries will not replace them. It is plausible that numerous new container query features could be introduced to the web in the coming years.

    So, what else could container queries do?

    Even before container queries became a reality, many innovative ideas were put forth. Some of these concepts eventually materialized as container queries, while others remain promising ideas that have not yet been implemented.

    • Adam Argyle suggested several interesting functionalities that later became scroll-state queries. Additionally, he proposed querying whether an element is on-screen, wrapping, or ellipsing, which would be valuable additions.
    • Adam also suggested the ability to count child nodes, an idea that evolved into ‘sibling-count()’ and ‘sibling-index()’, though a container query approach is still desired.
    • Similarly, Matthew Dean noted that some container queries could also be implemented as pseudo-classes, a point of agreement. Matthew further proposed that container queries could detect if a flex container is wrapped, and determine the row/column within a flexbox or grid container.

    These ideas are likely to be realized eventually, either as container queries or through alternative syntaxes. A prediction for 2026 is that container queries will become a dominant force in web development.

    What other functionalities would be beneficial for container queries?

    References

    • Learn container queries with interactive examples (Ahmad Shadeed)
    • Detect fallback positions with anchored container queries from Chrome 143 (Una Kravets)
    • Play With Inherit Function (Roma Komarov)
    • On Inheriting and Sharing Property Values (Daniel Schwarz)
    • Browser support for current and future container queries (CanIUse)
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleChatGPT Mobile App Surpasses $3 Billion in Consumer Spending
    Next Article Creating Dynamic Scroll-Based Animations with CSS view()
    Samuel Alejandro

    Related Posts

    Dev

    Key CSS Developments: Conditional View Transitions, Text Effects, and Community Insights

    January 9, 2026
    Dev

    Older Tech In The Browser Stack

    January 8, 2026
    Dev

    CSS Wrapped 2025

    January 8, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Latest Post

    ChatGPT Mobile App Surpasses $3 Billion in Consumer Spending

    December 21, 202512 Views

    Automate Your iPhone’s Always-On Display for Better Battery Life and Privacy

    December 21, 202510 Views

    Creator Tayla Cannon Lands $1.1M Investment for Rebuildr PT Software

    December 21, 20259 Views
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram
    About

    Welcome to NodeToday, your trusted source for the latest updates in Technology, Artificial Intelligence, and Innovation. We are dedicated to delivering accurate, timely, and insightful content that helps readers stay ahead in a fast-evolving digital world.

    At NodeToday, we cover everything from AI breakthroughs and emerging technologies to product launches, software tools, developer news, and practical guides. Our goal is to simplify complex topics and present them in a clear, engaging, and easy-to-understand way for tech enthusiasts, professionals, and beginners alike.

    Latest Post

    Is ChatGPT’s New Shopping Research Solving a Problem, or Creating One?

    January 9, 20260 Views

    How GitHub Engineers Address Platform Challenges

    January 9, 20260 Views

    Key CSS Developments: Conditional View Transitions, Text Effects, and Community Insights

    January 9, 20260 Views
    Recent Posts
    • Is ChatGPT’s New Shopping Research Solving a Problem, or Creating One?
    • How GitHub Engineers Address Platform Challenges
    • Key CSS Developments: Conditional View Transitions, Text Effects, and Community Insights
    • As RAM prices skyrocket and Windows 11 flounders, Linux gains native NVIDIA GeForce NOW support — turning the cloud into a sanctuary for priced-out gamers
    • Honor Magic 8 Pro: A Contender in the Flagship Smartphone Arena
    Facebook X (Twitter) Instagram Pinterest
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms & Conditions
    • Disclaimer
    • Cookie Policy
    © 2026 NodeToday.

    Type above and press Enter to search. Press Esc to cancel.