Join the Webstudio community

Updated 2 months ago

Variables and sticky

At a glance

The community member in the post is excited about using variables to set the height of a fixed navigation, which helps prevent overlapping with sticky elements. The comments discuss the idea of an "is-sticky" breakpoint, which could be useful for determining whether an element is sticky within the scroll. One community member shares a link to an article about state container queries, but overall there is no explicitly marked answer in the discussion.

Useful resources
Ah man variables are so nice. Now I can set a nav height var so when I make things sticky, they use this one var to ensure it doesnt overlap with my fixed nav. And I can change this by breakpoint πŸ”₯
Attachment
image.png
B
J
6 comments
What if there was "is-sticky" breakpoint?
Would it be more useful? Like set variable whether an element is sticky within scroll or not
I dont think for this particular use case, though having an is-sticky is something I've wanted in the past. Can't recall what it was though
Soon πŸ™‚
Add a reply
Sign up and join the conversation on Discord