some css colors from user and update my library Sass variables?
You not needed css variables just create object in data properties and update them
How to use them in sass?
<div :style=“styleObj” @click=“changeColor(color) > bla bla </div> data: { styleObj: { backgroundColor: ‘#FD0011”, } } methods: { changeColor(color) { this.styleObj.backgroundColor = color; } }
Thanks but I am looking for a way of styling in scss not js.
Have no idea how to do it as you want 🤷🏻♂️sorry
No problem coldrain thanks for help.
Or you can create classes with colors before. Like BEM modifiers. And change it from JS code.
Обсуждают сегодня