Scroll-state container queries (stuck, snapped, scrollable, scrolled)
Chrome 133 (`scrolled` in Chrome 144); Safari and Firefox not yet (2026-09). Not Baseline.
Chrome 133
Edge 133
Safari no
Firefox no
Style an element based on scroll state: a sticky header that gets a shadow when stuck, a snapped slide that scales up, a scroll container that shows edge hints only when it can scroll. Replaces IntersectionObserver sentinels.
Scroll inside this box.
CSS
.fx-055-scroll {
height: 200px;
overflow: auto;
border: 1px solid #ddd;
font-family: system-ui
}
.fx-055 {
position: sticky;
top: 0;
container-type: scroll-state;
background: #fff
}
.fx-055 span {
display: block;
padding: 12px;
transition: box-shadow .2s
}
@container scroll-state(stuck: top) {
.fx-055 span {
box-shadow: 0 4px 12px #0002
}
}
HTML
<div class="fx-055-scroll"><header class="fx-055"><span>Sticky header</span></header><p style="height:600px">Scroll inside this box.</p></div>Fallback: Unsupported browsers ignore the query; the header stays sticky without the shadow.
Source: developer.mozilla.org/en-US/docs/Web/CSS/Guides/Conditional_rules/Container_scroll-state_queries
Prompt
For sticky-header shadows and active-snap-item styling set `container-type: scroll-state` on the sticky/snapped element and style a child with `@container scroll-state(stuck: top)` / `scroll-state(snapped: x)` / `scroll-state(scrollable: bottom)`. Chromium-only as of 2026-09; no JS observers.