Open larz0 opened 10 years ago
The current order is just the order in which they're found in the project files (breadth-first project tree search, alphabetically by filename). If selectors were ordered was by specificity, the universal (*) and type (body) selectors would be grouped together.
Ordering by specificity is a big-ticket item -- we'd have to analyse the DOM structure, add code to compute the specificity of each selector, and potentially also need to figure out what order different CSS files are loaded on the page. (Or alternatively, during Live Preview we could leverage runtime info in the browser, and fall back to a simpler ordering when not under Live Preview). Marking 'move to backlog' since this is a sizeable chunk of work either way.
The most relevant selector (selector that overwrites the other selectors) is at the bottom; it should be at the top.