Future CSS: State Container Queries

The Chromium team is experimenting with a new type of query called State Query. This is in addition to size container queries and style queries that were introduced last year. State queries allow us to check the state of a container, such as whether a CSS variable persists or if an element is stuck in a sticky position. These queries have useful applications, such as changing the design of a header when it becomes sticky or hiding navigation when a flex container wraps. While state queries are still in the experimental stage, they offer exciting possibilities for enhancing CSS functionality.

https://ishadeed.com/article/css-state-queries/

To top