Change $brand-primary based on attribute

0
Hi all, Case: [I want to select a color via a color-picker. This color is used through the whole application as the $brand-primary]. Does anybody knows how to do this and if it's possible?   Martijn Jansen
asked
1 answers
3

In this case you can try mapping $brand-primary to a CSS custom property and some JavaScript to assign the value of the captured color. 

Sass variables are compiled but CSS custom properties are available at run time

$brand-primary: var(--userColor);

https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties

answered