Skip to content

Editorial review: scroll-state scrolled descriptor#43026

Merged
chrisdavidmills merged 14 commits intomdn:mainfrom
chrisdavidmills:scroll-state-scrolled
Mar 10, 2026
Merged

Editorial review: scroll-state scrolled descriptor#43026
chrisdavidmills merged 14 commits intomdn:mainfrom
chrisdavidmills:scroll-state-scrolled

Conversation

@chrisdavidmills
Copy link
Contributor

Description

Chrome 144 adds support for the @container at-rule scroll-state scrolled descriptor; see https://chromestatus.com/feature/5083137520173056.

This PR adds documentation for this new descriptor.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner February 5, 2026 14:52
@chrisdavidmills chrisdavidmills requested review from estelle and removed request for a team February 5, 2026 14:52
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed labels Feb 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Preview URLs (2 pages)

Flaws (13)

Note! 1 document with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/CSS/Reference/At-rules/@container
Title: @container
Flaw count: 13

  • broken_links:
    • Link /en-US/docs/Web/CSS/block-contents doesn't resolve
    • Link /en-US/docs/Web/CSS/custom-ident is a redirect
    • Link /en-US/docs/Web/CSS/size-feature doesn't resolve
    • Link /en-US/docs/Web/CSS/scroll-state-feature doesn't resolve
    • Link /en-US/docs/Web/CSS/function-token doesn't resolve
    • and 8 more flaws omitted

(comment last updated: 2026-03-10 15:50:09)

@chrisdavidmills chrisdavidmills changed the title scroll-state scrolled descriptor Technical review: scroll-state scrolled descriptor Feb 5, 2026
@chrisdavidmills chrisdavidmills requested a review from a team as a code owner February 19, 2026 10:19
@chrisdavidmills chrisdavidmills requested review from hamishwillee and removed request for a team February 19, 2026 10:19
@chrisdavidmills chrisdavidmills changed the title Technical review: scroll-state scrolled descriptor Editorial review: scroll-state scrolled descriptor Feb 19, 2026
@hamishwillee hamishwillee removed their request for review February 19, 2026 22:32
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grammar nits and a bit of source re-ordering. Nothing major, unless you want to fix the @container page (and create descriptor pages).

}
```

```css hidden live-sample___scrollable live-sample___scrolled live-sample___snapped live-sample___stuck
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put the "no support" hidden CSS after all other CSS for the all the examples using it so if the reader hits "play", this less relevant CSS is at the bottom of the CSS tab.

It also makes sense to put all hidden CSS after the shown CSS for the same reason. If there's ever a concern over cascade/specificity, put all the hidden CSS in a layer; anything not in a layer will always take precedence (unless !important is used, which it won't be)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've moved the @supports block to the end of the articles, and in the future, I'm going to bear what you've said about this in mind. That said, I'm not going to spend considerable time restructuring all the rest of the CSS source of this article. It is fairly complicated, there are quite a few shared bits, and I don't think the benefit to MDN Playground users outweighs the effort required, and the issue that it'll probably make it harder to edit for future editors.

Comment on lines +348 to +350
Scroll-state [`scrolled`](/en-US/docs/Web/CSS/Reference/At-rules/@container#scrolled) queries, written as `scroll-state(scrolled: value)`, test whether a container's scrolling ancestor was most recently scrolled in the given direction. If not, the query returns false.

The `value` indicates the direction you are testing for, for example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Scroll-state [`scrolled`](/en-US/docs/Web/CSS/Reference/At-rules/@container#scrolled) queries, written as `scroll-state(scrolled: value)`, test whether a container's scrolling ancestor was most recently scrolled in the given direction. If not, the query returns false.
The `value` indicates the direction you are testing for, for example:
Scroll-state [`scrolled`](/en-US/docs/Web/CSS/Reference/At-rules/@container#scrolled) queries, written as `scroll-state(scrolled: <keyword>)`, test whether a container's scrolling ancestor was most recently scrolled in the given direction. If not, the query returns false.
The keyword value indicates the direction you are testing for, for example:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this change, but I've kept this as a reminder rather than committing it, as there are four instances to update in the article. I've made those changes in my next commit.


- `block-start`: Tests whether the container was most recently scrolled towards its block-start edge.
- `right`: Tests whether the container was most recently scrolled towards its right-hand edge.
- `y`: Tests whether the container was most recently scrolled in either direction along its y axis.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `y`: Tests whether the container was most recently scrolled in either direction along its y axis.
- `y`: Tests whether the container was most recently scrolled in either direction along its vertical y-axis.

or

Suggested change
- `y`: Tests whether the container was most recently scrolled in either direction along its y axis.
- `y`: Tests whether the container was most recently scrolled up or down along the y-axis.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in my next commit. Again, I kept it as a reminder rather than committing it, as I thought there'd be multiple instances, but there was only one in the end.

chrisdavidmills and others added 6 commits March 6, 2026 12:06
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
@chrisdavidmills chrisdavidmills requested a review from estelle March 6, 2026 13:30
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. a few minor suggestions. approving. Can't wait to use this!

chrisdavidmills and others added 5 commits March 10, 2026 15:37
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
…state_queries/index.md

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
@chrisdavidmills chrisdavidmills merged commit c55c9e2 into mdn:main Mar 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants