codepen.io/bramus/full/...
codepen.io/bramus/full/...
I then continued with Gemini Code Assist in VS Code to create the package structure and some other related files.
And look: github.com/bramus/stick...
I then continued with Gemini Code Assist in VS Code to create the package structure and some other related files.
And look: github.com/bramus/stick...
Set `color-scheme: light dark` on `:root`, and its used value ends up being either `light` or `dark`, based on your preference.
(Could it be that the post got updated? Because it mentions this)
Set `color-scheme: light dark` on `:root`, and its used value ends up being either `light` or `dark`, based on your preference.
(Could it be that the post got updated? Because it mentions this)
A subtle difference though, is that the animation uses a `from` keyframe. That way you don’t need a permanently-fill-forward-animation.
gist.github.com/bramus/94b0e...
A subtle difference though, is that the animation uses a `from` keyframe. That way you don’t need a permanently-fill-forward-animation.
gist.github.com/bramus/94b0e...
As an alternative you can use inline if(), which has built-in protection for cycles.
As an alternative you can use inline if(), which has built-in protection for cycles.
(Although some require 2 lines of CSS … but that still beats +100 of lines of JS)
(Although some require 2 lines of CSS … but that still beats +100 of lines of JS)
But browser support for Scroll-Driven Animations is better than that for Scroll-State Queries, so perhaps better to stick to SDA (for now).
But browser support for Scroll-Driven Animations is better than that for Scroll-State Queries, so perhaps better to stick to SDA (for now).
There are links to bugs with other vendors in the post, so feel free to star/+1 those bugs to indicate interest.
There are links to bugs with other vendors in the post, so feel free to star/+1 those bugs to indicate interest.
codepen.io/bramus/pen/J...
/me mumbles something about shadow-piercing selectors …
codepen.io/bramus/pen/J...
/me mumbles something about shadow-piercing selectors …