This will not change or a little.
You can do this for some reason: more visibility when saving code. It is easier to find and remember a style for each type of element.
The second reason is the selector priority.
There are several different priorities:
!important > #id > .class > element
you can assume that
element = 1 .class = 10
And then div#id = 101> #id = 100
div#myid{ color:red; } #myid{ color:blue; } .myclass{ color:yellow; } div{ color:green; }
<div class="myclass" id="myid"> Some text </div>
Alexis
source share