{"action":"created","issue":{"url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/425","labels_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/425/labels{/name}","comments_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/425/comments","events_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/425/events","html_url":"https://github.com/jakubpawlowicz/clean-css/issues/425","id":53019206,"number":425,"title":"Use natural sort for sorting selectors","user":{"login":"cvrebert","id":419884,"avatar_url":"https://avatars.githubusercontent.com/u/419884?v=3","gravatar_id":"","url":"https://api.github.com/users/cvrebert","html_url":"https://github.com/cvrebert","followers_url":"https://api.github.com/users/cvrebert/followers","following_url":"https://api.github.com/users/cvrebert/following{/other_user}","gists_url":"https://api.github.com/users/cvrebert/gists{/gist_id}","starred_url":"https://api.github.com/users/cvrebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvrebert/subscriptions","organizations_url":"https://api.github.com/users/cvrebert/orgs","repos_url":"https://api.github.com/users/cvrebert/repos","events_url":"https://api.github.com/users/cvrebert/events{/privacy}","received_events_url":"https://api.github.com/users/cvrebert/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jakubpawlowicz/clean-css/labels/Enhancement","name":"Enhancement","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-29T04:25:58Z","updated_at":"2015-12-19T09:03:29Z","closed_at":null,"body":"It appears that clean-css now sorts selectors, whereas it didn't previously.\r\nIt seems to be using a simple naive sort, which has somewhat unpleasant results when the selectors have numbers in them. For example:\r\n```css\r\n.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9 {...}\r\n```\r\nWould it be possible to use [natural sorting](http://blog.codinghorror.com/sorting-for-humans-natural-sort-order/) instead, to obtain more pleasant results? For example:\r\n```css\r\n.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12 {...}\r\n```\r\n\r\nHere are a couple libs I found on npm that might do the job:\r\n* https://www.npmjs.com/package/javascript-natural-sort\r\n* https://www.npmjs.com/package/natural-compare-lite"},"comment":{"url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/comments/165962331","html_url":"https://github.com/jakubpawlowicz/clean-css/issues/425#issuecomment-165962331","issue_url":"https://api.github.com/repos/jakubpawlowicz/clean-css/issues/425","id":165962331,"user":{"login":"jakubpawlowicz","id":24273,"avatar_url":"https://avatars.githubusercontent.com/u/24273?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubpawlowicz","html_url":"https://github.com/jakubpawlowicz","followers_url":"https://api.github.com/users/jakubpawlowicz/followers","following_url":"https://api.github.com/users/jakubpawlowicz/following{/other_user}","gists_url":"https://api.github.com/users/jakubpawlowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubpawlowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubpawlowicz/subscriptions","organizations_url":"https://api.github.com/users/jakubpawlowicz/orgs","repos_url":"https://api.github.com/users/jakubpawlowicz/repos","events_url":"https://api.github.com/users/jakubpawlowicz/events{/privacy}","received_events_url":"https://api.github.com/users/jakubpawlowicz/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T09:03:29Z","updated_at":"2015-12-19T09:03:29Z","body":"Thanks @jessehouchins for your input. I'm still considering it and leaving it open as an enhancement."}}