Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Toward https://github.com/snapshot-labs/workflow/issues/238
This PR will load an apply the new custom colors defined in the space's settings
Context
Instead of referencing a pre-defined skin, each space now have a new section in their settings, named
skinsColors
, which hold an object of variables, e.g.:The
skin
property is not used anymore, and the variables above will be transformed into CSS variables, then injected in the<head>
.This allow each space to customize their colors directly from their space settings. For now, colors are coming from the
skin
they're using, and imported from v1 using snapshot-labs/snapshot-sequencer#490Only whitelabel spaces will have access to custom colors, which will also overwrite and disable the
dark
/light
theme togglerHow to test
Depend on snapshot-labs/snapshot-hub#971
Here's a list of colors from the most used skins:
VITE_WHITE_LABEL_MAPPING='127.0.0.1;mod.eth' yarn dev
VITE_WHITE_LABEL_MAPPING='127.0.0.1;astronos.eth' yarn dev
VITE_WHITE_LABEL_MAPPING='127.0.0.1;friesdao.eth' yarn dev
VITE_WHITE_LABEL_MAPPING='127.0.0.1;balancer.eth' yarn dev
VITE_WHITE_LABEL_MAPPING='127.0.0.1;gmdao.eth' yarn dev
Uniswap
Astronos
Fries
Balancer
Light
Notes
Not all themes are working 100%, this will be fixed on another PR, as this PR is focused on laoding the custom colors, and not refactoring the styles/classname