{"action":"created","issue":{"url":"https://api.github.com/repos/aristath/kirki/issues/1107","repository_url":"https://api.github.com/repos/aristath/kirki","labels_url":"https://api.github.com/repos/aristath/kirki/issues/1107/labels{/name}","comments_url":"https://api.github.com/repos/aristath/kirki/issues/1107/comments","events_url":"https://api.github.com/repos/aristath/kirki/issues/1107/events","html_url":"https://github.com/aristath/kirki/pull/1107","id":174994419,"number":1107,"title":"'elements' sort order in CSS output","user":{"login":"rahulnever2far","id":3503359,"avatar_url":"https://avatars.githubusercontent.com/u/3503359?v=3","gravatar_id":"","url":"https://api.github.com/users/rahulnever2far","html_url":"https://github.com/rahulnever2far","followers_url":"https://api.github.com/users/rahulnever2far/followers","following_url":"https://api.github.com/users/rahulnever2far/following{/other_user}","gists_url":"https://api.github.com/users/rahulnever2far/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulnever2far/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulnever2far/subscriptions","organizations_url":"https://api.github.com/users/rahulnever2far/orgs","repos_url":"https://api.github.com/users/rahulnever2far/repos","events_url":"https://api.github.com/users/rahulnever2far/events{/privacy}","received_events_url":"https://api.github.com/users/rahulnever2far/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-05T04:42:40Z","updated_at":"2016-09-17T16:33:36Z","closed_at":"2016-09-17T16:33:36Z","pull_request":{"url":"https://api.github.com/repos/aristath/kirki/pulls/1107","html_url":"https://github.com/aristath/kirki/pull/1107","diff_url":"https://github.com/aristath/kirki/pull/1107.diff","patch_url":"https://github.com/aristath/kirki/pull/1107.patch"},"body":"CSS output should have the original order of array elements if `elements` is an array. It helps in debugging."},"comment":{"url":"https://api.github.com/repos/aristath/kirki/issues/comments/247786758","html_url":"https://github.com/aristath/kirki/pull/1107#issuecomment-247786758","issue_url":"https://api.github.com/repos/aristath/kirki/issues/1107","id":247786758,"user":{"login":"aristath","id":588688,"avatar_url":"https://avatars.githubusercontent.com/u/588688?v=3","gravatar_id":"","url":"https://api.github.com/users/aristath","html_url":"https://github.com/aristath","followers_url":"https://api.github.com/users/aristath/followers","following_url":"https://api.github.com/users/aristath/following{/other_user}","gists_url":"https://api.github.com/users/aristath/gists{/gist_id}","starred_url":"https://api.github.com/users/aristath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aristath/subscriptions","organizations_url":"https://api.github.com/users/aristath/orgs","repos_url":"https://api.github.com/users/aristath/repos","events_url":"https://api.github.com/users/aristath/events{/privacy}","received_events_url":"https://api.github.com/users/aristath/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T16:33:36Z","updated_at":"2016-09-17T16:33:36Z","body":"Actually this can't be removed.\r\n\r\nImagine this scenario:\r\n\r\n```php\r\n'output' => array(\r\n\tarray(\r\n\t\t'element' => array(\r\n\t\t\t'.element-1',\r\n\t\t\t'.element-2',\r\n\t\t),\r\n\t\t'property' => 'color',\r\n\t),\r\n\tarray(\r\n\t\t'element' => array(\r\n\t\t\t'.element-2',\r\n\t\t\t'.element-1',\r\n\t\t),\r\n\t\t'property' => 'background-color',\r\n\t),\r\n),\r\n```\r\n\r\nUsing the `sort` function there, this is the CSS we'll have in the end:\r\n```css\r\n.element-1, .element-2 { color: #ffffff;, background-color: #ffffff }\r\n```\r\n\r\nIf we remove the `sort` function, we're gonna get this instead:\r\n```css\r\n.element-1, .element-2 { color: #ffffff; }\r\n.element-2, .element-1 { background-color: #ffffff }\r\n```\r\n\r\nUsing `sort` we're making sure that the generated CSS is properly minimized."}}
{"actor":{"display_login":"aristath"}}