View Single Post
Old 09-06-2016, 12:11 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kovidgoyal View Post
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.
JSWolf is offline   Reply With Quote