<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo" -->

---
title: Is it scrolled? Is it not? Let's find out with CSS...
description: CSS @container scroll-state() queries let developers detect scroll-related states without JavaScript. Chrome 133 introduced stuck, snapped, and scrollable...
canonical: https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Is it scrolled? Is it not? Let's find out with CSS @container scroll-state() queries | daily.dev
og:description: CSS @container scroll-state() queries let developers detect scroll-related states without JavaScript. Chrome 133 introduced stuck, snapped, and scrollable...
og:url: https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo
og:image: https://api.daily.dev/og/posts/dChSRCGDO.png
og:image:alt: Is it scrolled? Is it not? Let's find out with CSS @container scroll-state() queries
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Is it scrolled? Is it not? Let's find out with CSS @container scroll-state() queries

**[utilitybend](https://daily.dev/sources/utilitybend)** · 6 min read · 0 upvotes · 0 comments

## Summary

CSS @container scroll-state() queries let developers detect scroll-related states without JavaScript. Chrome 133 introduced stuck, snapped, and scrollable states, letting you style sticky headers, active carousel items, and scroll arrows purely in CSS. Chrome 144 adds the scrolled state, which tracks the direction of the most recent scroll, enabling hidey-bar headers and one-time scroll hints without JS. A related Chromium bug has been filed. Broad reliance still depends on wider browser support, with JS fallbacks needed for cross-browser production use.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://utilitybend.com/blog/is-it-scrolled-is-it-not-lets-find-out-with-css-container-scroll-state-queries>

## Questions this post answers

### What does the new scroll-state(scrolled) CSS query do in Chrome 144?

It tracks the direction of the most recently occurred scroll, letting you style elements based on whether the user just scrolled up or down (or left/right). For example, @container scroll-state(scrolled: bottom) can hide a header when the user scrolls down, and scroll-state(scrolled: top) can show it again on scroll up, all without JavaScript. It shipped in Chrome 144.

_daily.dev surfaces browser feature updates like this one for developers replacing scroll JavaScript with CSS._

### What scroll-state container query states were available before Chrome 144?

Chrome 133 shipped three scroll-state values: stuck, snapped, and scrollable. Stuck detects whether a position: sticky element is currently stuck to an edge, snapped detects which item in a scroll-snap container is currently snapped into view, and scrollable checks whether there is unscrolled content past a given edge, useful for showing or hiding scroll arrows.

_Developers weighing CSS versus JS for scroll UI can track browser support changes like these on daily.dev._

### How do I detect if a sticky header is currently stuck using CSS instead of JavaScript?

Set container-type: scroll-state on the sticky element's wrapper, then use @container scroll-state(stuck: top) to apply styles like a background color or shadow only while it is stuck to the top. This CSS-only approach replaces the previously required JavaScript intersection observer or scroll event logic and shipped in Chrome 133.

_Anyone replacing sticky-header JavaScript hacks can follow CSS feature rollouts like this via daily.dev._

## Similar posts on daily.dev

- [Directional CSS with scroll-state\(scrolled\)](https://daily.dev/posts/directional-css-with-scroll-state-scrolled--okqxocp8h) · Una Kravets · 29 upvotes · 2 comments
- [CSS @container scroll-state: Replace JS scroll listeners now](https://daily.dev/posts/css-container-scroll-state-replace-js-scroll-listeners-now-ftsviotnt) · LogRocket · 39 upvotes · 0 comments
- [Scroll-Driven, Scroll-Triggered, Scroll States, and View Transitions](https://daily.dev/posts/scroll-driven-scroll-triggered-scroll-states-and-view-transitions-xgdb8eccn) · CSS-Tricks · 142 upvotes · 18 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#css](https://daily.dev/tags/css), [#google-chrome](https://daily.dev/tags/google-chrome)

[View this post on daily.dev](https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Is it scrolled? Is it not? Let's find out with CSS @container scroll-state() queries","url":"https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo"},"datePublished":"2026-09-20T07:43:31.998Z","dateModified":"2026-09-20T07:44:43.207Z","description":"CSS @container scroll-state() queries let developers detect scroll-related states without JavaScript. Chrome 133 introduced stuck, snapped, and scrollable...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cddf2ae1becf191fcd3732e93744239a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cddf2ae1becf191fcd3732e93744239a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"utilitybend","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"utilitybend","logo":"https://media.daily.dev/image/upload/s--hONVFSz4--/f_auto,q_auto/v1789890196/logos/utilitybend?_a=BAMAMicg0","url":"https://daily.dev/sources/utilitybend"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,css,google-chrome","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"utilitybend","item":"https://daily.dev/sources/utilitybend"},{"@type":"ListItem","position":3,"name":"Is it scrolled? Is it not? Let's find out with CSS @container scroll-state() queries"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/is-it-scrolled-is-it-not-let-s-find-out-with-css-container-scroll-state-queries-dchsrcgdo#faq","mainEntity":[{"@type":"Question","name":"What does the new scroll-state(scrolled) CSS query do in Chrome 144?","acceptedAnswer":{"@type":"Answer","text":"It tracks the direction of the most recently occurred scroll, letting you style elements based on whether the user just scrolled up or down (or left/right). For example, @container scroll-state(scrolled: bottom) can hide a header when the user scrolls down, and scroll-state(scrolled: top) can show it again on scroll up, all without JavaScript. It shipped in Chrome 144. daily.dev surfaces browser feature updates like this one for developers replacing scroll JavaScript with CSS."}},{"@type":"Question","name":"What scroll-state container query states were available before Chrome 144?","acceptedAnswer":{"@type":"Answer","text":"Chrome 133 shipped three scroll-state values: stuck, snapped, and scrollable. Stuck detects whether a position: sticky element is currently stuck to an edge, snapped detects which item in a scroll-snap container is currently snapped into view, and scrollable checks whether there is unscrolled content past a given edge, useful for showing or hiding scroll arrows. Developers weighing CSS versus JS for scroll UI can track browser support changes like these on daily.dev."}},{"@type":"Question","name":"How do I detect if a sticky header is currently stuck using CSS instead of JavaScript?","acceptedAnswer":{"@type":"Answer","text":"Set container-type: scroll-state on the sticky element's wrapper, then use @container scroll-state(stuck: top) to apply styles like a background color or shadow only while it is stuck to the top. This CSS-only approach replaces the previously required JavaScript intersection observer or scroll event logic and shipped in Chrome 133. Anyone replacing sticky-header JavaScript hacks can follow CSS feature rollouts like this via daily.dev."}}]}
```

