Are CSS selectors without properties of any effect? -
i got maintenance job , there huge css file, in found lot of things following:
.xxxx {}
that is, selector absolutely nothing in it. think useless, there many of them start doubt myself. right can removed safely? or doing , should keep them?
i'd it's worst design in history (or stronger contender title...) could used.
see below:
document.stylesheets[0].cssrules[0].style.setproperty('color', 'red');
.randomclass {}
<div class="randomclass">no styling?</div>
you can acces, process, , modify stylesheets. if selector empty of styles, can modified using code.
so, it's safe remove, if want 100% certain, either leave there, or go through possible code branches.
Comments
Post a Comment