vpanov.bsky.social
@vpanov.bsky.social
Yeah, I saw his post somewhere (probably here on Bluesky), if you mean this demo
codepen.io/bramus/pen/d....
Maybe combined with new if() functions I can do what I want. Would be an interesting challenge.
CSS scroll-direction detection with Scroll-Driven Animations with moving header
...
codepen.io
December 23, 2025 at 6:30 PM
Oh, I'm so sorry for disturbing you. Have a great day!
And thank you for the demo.
December 23, 2025 at 6:19 PM
I think it will be easier to understand my intention if you see an example.
I want to be able to show/hide header like it's done here (works on mobile devices only), but without JS.
www.motorsport.com
The problem with JS is that it requires to add/remove class, which causes style recalculations.
Motorsport.com: F1 News, MotoGP, NASCAR, Rallying and more
View the latest auto racing results, news and driver standings. We cover Formula 1, MotoGP, NASCAR, Indycar and all other driving categories.
www.motorsport.com
December 23, 2025 at 5:35 PM
Please correct me if I'm wrong, but those would only trigger once I reach specific point in the document.
What I want is to have relative value based on current scroll position. Like this codepen.io/bramus/pen/q..., but not immediate, to accommodate for small scrolling corrections.
Hidey Bar Demo (Hide on Scroll Down, Show on Scroll Up // Scroll State Queries)
...
codepen.io
December 23, 2025 at 4:48 PM
Hello @una.im,
Is there a plan to support range syntax, something similar to this chrome.dev/css-wrapped-...?
e.g.
@container scroll-state(scrolled: bottom > 40px) {
...
}
This would be helpful if I want to show/hide header after [x]px of scrolling up/down. Or how would you approach this?
CSS Wrapped 2025
Sculpt dynamic interfaces, stretch your imagination, and play with these 22 powerful new CSS features that landed in Chrome this year.
chrome.dev
December 23, 2025 at 8:00 AM
Thank you, Jen!
I understand why it's impossible for a browser to detect which image to use until the layout is ready, but it's really hard and error prone to manually provide correct sizing for all possible cases with such a dynamic layout.
December 23, 2025 at 7:24 AM
Great stuff, now the only problem is how to write responsive srcset for all of this. Is there any change that dealing with those would become easier?
December 21, 2025 at 9:18 AM
and to allow better control over this we can have additional attribute (or something), e.g. `delayeduntil="[visible|never|idle]"`
December 12, 2025 at 8:13 AM
@jakearchibald.com I'm wondering whether it will delay swapping of content for hidden blocks?
I have something similar built using JS, where complex menu is rendered into template and only rendered once drawer with this menu is opened by user. This would help keep HTML size under control.
December 12, 2025 at 8:07 AM
Reposted