{"action":"created","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2440","labels_url":"https://api.github.com/repos/less/less.js/issues/2440/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2440/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2440/events","html_url":"https://github.com/less/less.js/issues/2440","id":56902141,"number":2440,"title":"@import (css) \"file.css\" puts the css at the top of the output","user":{"login":"thehung2224","id":5288362,"avatar_url":"https://avatars.githubusercontent.com/u/5288362?v=3","gravatar_id":"","url":"https://api.github.com/users/thehung2224","html_url":"https://github.com/thehung2224","followers_url":"https://api.github.com/users/thehung2224/followers","following_url":"https://api.github.com/users/thehung2224/following{/other_user}","gists_url":"https://api.github.com/users/thehung2224/gists{/gist_id}","starred_url":"https://api.github.com/users/thehung2224/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehung2224/subscriptions","organizations_url":"https://api.github.com/users/thehung2224/orgs","repos_url":"https://api.github.com/users/thehung2224/repos","events_url":"https://api.github.com/users/thehung2224/events{/privacy}","received_events_url":"https://api.github.com/users/thehung2224/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/less/less.js/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/less/less.js/labels/Medium%20Priority","name":"Medium Priority","color":"0000E0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-07T07:47:16Z","updated_at":"2015-03-21T19:21:41Z","closed_at":null,"body":"Take the following less file, call it style.less:\r\n\r\n```css\r\n/*------------------------------------*\\\r\n\t#IMPORT\r\n\\*------------------------------------*/\r\n\r\n/**\r\n * CSS files\r\n */\r\n\r\n@import (css) \"../css/bootstrap.css\";\r\n```\r\n\r\nLook at the generated style.css then I see bootstrap css file at the top, followed by the comments.\r\n\r\nHow do I fix it? Thanks in advance."},"comment":{"url":"https://api.github.com/repos/less/less.js/issues/comments/84429888","html_url":"https://github.com/less/less.js/issues/2440#issuecomment-84429888","issue_url":"https://api.github.com/repos/less/less.js/issues/2440","id":84429888,"user":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T19:21:41Z","updated_at":"2015-03-21T19:21:41Z","body":"Hrmm, its always been like this it looks like. Its caused by the code\r\n\r\nhttps://github.com/less/less.js/blob/master/lib/less/tree/ruleset.js#L338\r\n\r\n@seven-phases-max @SomMeri \r\n\r\nLooking at the history, It seems the logic over separating rulesets and rules is quite old. I am wondering how much is valid. Surely all we want to do is a) float imports statements above non comment statements b) float charsets above everything. Can you think of any reasons why anything else needs to be moved around? If we are not in root, what would need moving?\r\n\r\nI'm in the process of refactoring it out and looks like all existing tests would still pass.."}}