Here is my problem :
I use a CMS with a default CSS file that I don’t want to modify because the CMS updates could replace this file. So I use a custom CSS file in addition of the default CSS file to change the CMS theme.
But sometimes I just want to disable a rule written in the default CSS file. As I can’t delete or comment the rule, I re-write the same rule in the custom CSS file with the default values in the properties.
Example :
/* default CSS file */
.class { background-color : black; }
/* cutom CSS file */
.class { background-color : none; }
So I would like to know if there is a way to just disable a rule without re-writting the same rule ?
I think…basically no. You have to specify exactly same rules which you would like to disable.
But you can add some postprocessor to css files. In apache, all css requests route to something like postprocessor.php and there you can remove code which don’t want with some parser, replacer.
Second choice is make some plugin for cms, which have some settings for this.
Third way to do this is using some dynamic/meta/scripting css language etc. SASS, LESS for generating this disabling rules.