webstudio-is / webstudio

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
https://webstudio.is
GNU Affero General Public License v3.0
4.75k stars 551 forks source link

CSS Variables #3399

Open kof opened 4 months ago

kof commented 4 months ago

Enable using CSS variables in Advanced styles section. This will enable better design systems and unblock making a standard style guide for Webstudio.

TODO

Ideas

Move above if valid/finalized

TrySound commented 4 days ago

Remove var() from field display and just show --size-6. It adds a lot of clutter and often hides the details

we could do this but how user would add fallback?

kof commented 4 days ago

Remove var() from field display and just show --size-6. It adds a lot of clutter and often hides the details

we could do this but how user would add fallback?

alternative proposal: show the computed value in the spacing UI, then show full var() in the input when clicked

kof commented 4 days ago

Just checked WF does exactly that, in padding UI - computed value. Though they don't let you edit the original value when you click in either, but since we are using css value input everywhere - we can let user edit calc() and such in the input

TrySound commented 1 day ago

Gradient previews on the variable definition (nice to have). Editing them is difficult as I have no idea which one is which

I guess we could detect gradient values though we need gradient control there which we do not have yet