{"action":"created","issue":{"url":"https://api.github.com/repos/dotless/dotless/issues/477","labels_url":"https://api.github.com/repos/dotless/dotless/issues/477/labels{/name}","comments_url":"https://api.github.com/repos/dotless/dotless/issues/477/comments","events_url":"https://api.github.com/repos/dotless/dotless/issues/477/events","html_url":"https://github.com/dotless/dotless/issues/477","id":100366933,"number":477,"title":"mixin misbehaviour","user":{"login":"t1l3r","id":10064538,"avatar_url":"https://avatars.githubusercontent.com/u/10064538?v=3","gravatar_id":"","url":"https://api.github.com/users/t1l3r","html_url":"https://github.com/t1l3r","followers_url":"https://api.github.com/users/t1l3r/followers","following_url":"https://api.github.com/users/t1l3r/following{/other_user}","gists_url":"https://api.github.com/users/t1l3r/gists{/gist_id}","starred_url":"https://api.github.com/users/t1l3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t1l3r/subscriptions","organizations_url":"https://api.github.com/users/t1l3r/orgs","repos_url":"https://api.github.com/users/t1l3r/repos","events_url":"https://api.github.com/users/t1l3r/events{/privacy}","received_events_url":"https://api.github.com/users/t1l3r/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-11T17:44:50Z","updated_at":"2015-08-11T17:56:16Z","closed_at":"2015-08-11T17:56:16Z","body":"I stumbled upon a mixin misbehaviour which doesn't quite fit my expectations.\r\n\r\nLet's say there is a common.less stylesheet which contains the following simplyfied fragment:\r\n```less\r\n.color {\r\n    &01 { ... }\r\n    &02 { ... }\r\n    &BG { background-color: @colorBGDefault; }\r\n}\r\n```\r\nNow I import the common.less in another stylesheet and want to mix-in the class/mixin `.colorBG`.\r\n```less\r\n@import 'common.less';\r\n.box  { .colorBG; }\r\n.grid { .colorBG; }\r\n...\r\n```\r\nMy expectation for the rendered output would be:\r\n```less\r\n.box  { background-color: somecolor; }\r\n.grid { background-color: somecolor; }\r\n```\r\nBut instead I receive the error *.colorBG is undefined on line ...*.\r\n\r\nWhen I move **&BG** out of the .color block\r\n```less\r\n.color {\r\n    &01 { ... }\r\n    &02 { ... }\r\n}\r\n.colorBG { background-color: @colorBGDefault; }\r\n```\r\nthere is no error.\r\n"},"comment":{"url":"https://api.github.com/repos/dotless/dotless/issues/comments/129993056","html_url":"https://github.com/dotless/dotless/issues/477#issuecomment-129993056","issue_url":"https://api.github.com/repos/dotless/dotless/issues/477","id":129993056,"user":{"login":"rytmis","id":121952,"avatar_url":"https://avatars.githubusercontent.com/u/121952?v=3","gravatar_id":"","url":"https://api.github.com/users/rytmis","html_url":"https://github.com/rytmis","followers_url":"https://api.github.com/users/rytmis/followers","following_url":"https://api.github.com/users/rytmis/following{/other_user}","gists_url":"https://api.github.com/users/rytmis/gists{/gist_id}","starred_url":"https://api.github.com/users/rytmis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rytmis/subscriptions","organizations_url":"https://api.github.com/users/rytmis/orgs","repos_url":"https://api.github.com/users/rytmis/repos","events_url":"https://api.github.com/users/rytmis/events{/privacy}","received_events_url":"https://api.github.com/users/rytmis/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T17:56:16Z","updated_at":"2015-08-11T17:56:16Z","body":"No problem, I figured that might be the case, since I wrote the code to support that in 1.5. :) "}}