The Holy Grail of reusable style frameworks is to provide ways to change colors easily. After all, sites need to match the brand identity. Exposing SASS variables like Bootstrap's
$primary-color, and Kendo UI's
$accent allow this. But what if scripts need the values of these variables?
We had this problem while developing Kendo UI for Angular. The styles of the charting package follow the theme design, with the same colors as defined in SCSS. Simply copying the color values in the chart scripts is duplication, and would make the charts look different if customers change the theme colors. So why not encode these variables in the CSS, and let the script read them from there? This creates a
... read the whole story at ofcodeandcolor.com.