Join the Webstudio community

Updated 2 months ago

Craft Marketplace - why all the color variables

At a glance
I'm starting a new project with the craft marketplace template.
I like the way it is set up, to work with variables and a styleguide where the most common layouts are available.
But i don't know the benefit of all the different colors that are set in the variables. For me it clutters the variable section.
Am i missing something here? Why use these colors and not just the colors that you are going to use in your project?
Attachment
image.png
3
J
P
O
17 comments
Yeah I should probably remove the ones that aren't used there. Basically they all come from Open Props. Then I map the themes coors to the Open Props ones. After that maybe its good practice to remove all the extras
Attachment
image.png
oh, i see. This all comes from open-props. Thanks for answering my question John!
The quesiton is basically if we should include full open props library or not
ah, on a specific template? then yes, definitely delete all unused variables
actually we need a function to clean it up with 1 click
@John Siciliano would that be helpful? or do you still need to select which unused variables need to stay?
It's not only the sheer amount of variable of the same type (here: colours), but variables of unexpected type that may get in the way. It's not likely that wants to set element sizes based on an predefined gradient or easing behaviour.

Mapping the most likely variable-types per input-type and letting user search for uncommon ones would make variables a lot easier to digest.
Attachment
2024-12-01_11h51_44.webp
I think there would need to be some unused vars that need to stay. Like if I use box shadow 3 but not 2 or 1.. or if I use size 1 and 3 but not 2, I dont think it makese sense to get rid of the "in betweens"
So right now I think what I'd do is option click the color palettes that aren't used. Or what about setting their values to unset?

Any opinions?
Maybe if the value is needed, it should be used in the style guide, so it can't be cleeaned up as unused?
One idea that came to mind was to use collapsible elements to keep things tidy—something like grouping variables into dropdowns based on their prefixes. I understand this might not make much sense since the advanced section is typically reserved for all CSS attributes. However, in Global Roots, this could help reduce clutter, especially in colors, and serve as a temporary solution until the dedicated variables section is implemented.
True but this is something separate.
Maybe, seems like a lot of add all of the sizes just so they don't get cleaned up.

For Webstudio site, I removed all the extra colors but kept everything else including gradients (there are 30 but we only use 6). Part of this is because if I ever add gradient 7, all of my gradients will be next to eachother. If I remove gradient 7 then add it back, it will be placed at the top of the list
maybe can be done in a smart way, e.g. using a select box or something to avoid cluttering the page
Part of this is because if I ever add gradient 7, all of my gradients will be next to eachother. If I remove gradient 7 then add it back, it will be placed at the top of the list

So we need alphabetic sorting there?
What about something like this? https://purgecss.com/
Add a reply
Sign up and join the conversation on Discord