Y
Y
yadscreech2019-02-11 22:22:01
JavaScript
yadscreech, 2019-02-11 22:22:01

How to dynamically change a variable in sass using jQuery?

Tell me how you can change the value of the $maneColor variable (if at all), dynamically using jQuery or native JS.

https://codepen.io/yaroslavdmitriev/pen/WPJdex

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2019-02-11
@yadscreech

In sass, it's not really variables, but rather constants. When compiling to css, they will be replaced with normal values, as if you entered them by hand. Another thing is css variables. They can be easily changed through js
Here I have an example from another question lying around https://jsfiddle.net/Vlad_IT/5pyn2Lo9/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question