Quote:
Originally Posted by kovidgoyal
I dont see how you can sort CSS rules at all, in the general case. For example,
.class2 { color: red}
.class1 { color: green}
If you sort that to
.class1 { color: green}
.class2 { color: red}
You will have changed the color of any element that has both those selectors apply to it. Before the sort, it would be green, after the sort it would be red.
This is because the specificity of a selector depends on its position in the stylesheet with respect to other selectors.
|
I don't see how the sorted version is an issue? class1 is still green and class2 is still red.