Join the Webstudio community

Updated 4 weeks ago

Variables CSS

I know it's actually on the roadmap and I'm really excited about this feature to build a nice style guide.

Would it be possible to use it in the style panel too?

Could be great to use it for example in the space element.

Thanks πŸ’ͺ
Attachment
SCR-20240726-nhfo.png
1
B
M
O
18 comments
Yes, will work there
similar to keywords autocomplete
things like var(--padding-xl ) or other naming instead of 5rem will work in this panel?
probably similar to how it works in wf
with exception that it will work for any properties, not only some
and that the behavior of css variables will be like its in the real world - overridable/nestable on every tree level, not just global
I cannot wait for that feature
Webflow take almost 10 years to implement it. Webstudio did it in 1.5 years. Unbeatable guys πŸ’ͺ
And will it be possible to setup css variables for breakpoints? Webflow still cannot provide this feature
Do you mean css variables inside of media queries or literally using css variables as min-width inside the media query?

Not sure what you mean
I mean a simple UI to define CSS variables similar to webflow, but with ability to define them for breakpoints (which will be media queries as well). Without a need to write custom css for changing that variables accross breakoints
Got it. Yeah. All variables in the tree are just like properties, part of a selected media query.

The question is what's going to be the behavior of global/root variables
I think Bogdan already made them follow same rules.

So it's on a breakpoint always.
Main breakpoint affects everything.
Specific breakpoints affect just those breakpoints.

Same thing as with any css property
Add a reply
Sign up and join the conversation on Discord