View Single Post
Old 07-25-2014, 03:39 AM   #36
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,481
Karma: 28000000
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want to make it robust, you have to do a multisort, sorting primarily on selector specificity and secondarily on selector name. You can use the cssselect module to easily calculate selector specificities.
kovidgoyal is offline   Reply With Quote