-
Notifications
You must be signed in to change notification settings - Fork 711
[css-conditional-5] Match scroll-state(scrollable) for root element on viewport #11542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is this an instance where the viewport should act as a default scroll-state container? Or do we only want it to be allowed as one, by propagating? |
I feel like we should avoid propagation if possible here (that's our general policy, after all), and just say that if nothing else catches the scroll-state() query, it's answered by the viewport. So this would mean that Rune's code wouldn't work as intended (as the root element is capturing the scroll-state query), but if you removed the |
I agree I like that better than propagation. |
Maybe propagate is not the right term, but we do apply scroll-snap-type from root to viewport: https://drafts.csswg.org/css-scroll-snap/#scroll-snap-type In that case we don't have an alternative way, I guess.
Isn't that a bit of a trap for authors? That setting scroll-state on the root element stops scroll-state() queries on the viewport from working? |
For the following:
The query will not match unless we match the state of the viewport instead of the root element, since the root element never gets scrollbars.
We should add to the spec that queries that query features of a scroll container should consider the viewport for the root element.
The text was updated successfully, but these errors were encountered: