Answer the question
In order to leave comments, you need to log in
Variables in CSS vs Sass vs Less?
There is a template for CMS.
It is necessary to make it possible to change the color and other specified CSS rules for some blocks directly from the template admin panel.
That is, in fact, we need variables in CSS.
Preprocessors, as I understand it, are not suitable in my case, because the client is a complete zero, and he needs to select a color and click save, there can be no question of any compilation.
But variables in CSS are not supported by all browsers.
Any solutions?
Answer the question
In order to leave comments, you need to log in
In the data attribute of the button you write the selector, in the function you read
var panel_id = $(this).attr('data-target');
$("#" + panel_id).slideToggle("fast");
scss - https://github.com/leafo/scssphp
less - https://github.com/oyejorge/less.php
There are other libraries, these are the very first ones I found
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question