I wish to get color from the user and modify the existing sass color variable to the color choose by the user. I saw a link, but still there is no example related to angular 2 on this. Please help. Thanks in advance.
2 Answers
SASS is CSS pre-processor, so by the time you're client HTML markup is consuming it, the variables have already been materialized and now form standard CSS.
Once you start tinkering with Sass, it will take your preprocessed Sass file and save it as a normal CSS file that you can use in your web site.
As Manu Valdés calls attention to, there are other things that you can do with Angular2 specifically to help with styling. For details on component styling check out the official documentation here.
3 Comments
You can use inline styles like <div [style.color]="colorVar"> so you can change the colorVar value from ts to change the color of the div