{"action":"created","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2556","labels_url":"https://api.github.com/repos/less/less.js/issues/2556/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2556/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2556/events","html_url":"https://github.com/less/less.js/issues/2556","id":69234607,"number":2556,"title":"Mixin overloads from detached ruleset caller scope aren't applied","user":{"login":"SLaks","id":313894,"avatar_url":"https://avatars.githubusercontent.com/u/313894?v=3","gravatar_id":"","url":"https://api.github.com/users/SLaks","html_url":"https://github.com/SLaks","followers_url":"https://api.github.com/users/SLaks/followers","following_url":"https://api.github.com/users/SLaks/following{/other_user}","gists_url":"https://api.github.com/users/SLaks/gists{/gist_id}","starred_url":"https://api.github.com/users/SLaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SLaks/subscriptions","organizations_url":"https://api.github.com/users/SLaks/orgs","repos_url":"https://api.github.com/users/SLaks/repos","events_url":"https://api.github.com/users/SLaks/events{/privacy}","received_events_url":"https://api.github.com/users/SLaks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/less/less.js/labels/Consider%20Closing","name":"Consider Closing","color":"444444"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-04-17T22:59:10Z","updated_at":"2015-04-19T13:20:02Z","closed_at":null,"body":"**Source**:\r\n\r\n```less\r\n.Method() when (default()) {\r\n  content: 'Not inverted';\r\n}\r\n\r\n.CallInverted(@callback) {\r\n  @invert: true;\r\n  @callback();\r\n\r\n  .Method() when (@invert) {\r\n    content: 'Inverted';\r\n  }\r\n}\r\n\r\n.Call(@callback) {\r\n  @invert: false;\r\n  @callback();\r\n}\r\n\r\n\r\na {\r\n  .CallInverted({ .Method(); });\r\n}\r\n\r\nb {\r\n  .Call({ .Method(); });\r\n}\r\n\r\nc {\r\n  .Method();\r\n}\r\n```\r\n\r\n**Current Output**:\r\n```css\r\na {\r\n  content: 'Not inverted';\r\n}\r\nb {\r\n  content: 'Not inverted';\r\n}\r\nc {\r\n  content: 'Not inverted';\r\n}\r\n```\r\n\r\n**Desired Output**:\r\n```css\r\na {\r\n  content: 'Inverted';\r\n}\r\nb {\r\n  content: 'Not inverted';\r\n}\r\nc {\r\n  content: 'Not inverted';\r\n}\r\n```\r\n\r\nContext: I want to make a set of mixins that are **sometimes** called in callbacks, and I want to make each one use a different definition from some callsites of the callbacks (the `.CallInverted()` mixin).\r\n\r\nI can't find any other way to do this, because the guard variable must be defined when called in global scope, and I can't override its value when called from a mixin."},"comment":{"url":"https://api.github.com/repos/less/less.js/issues/comments/94276408","html_url":"https://github.com/less/less.js/issues/2556#issuecomment-94276408","issue_url":"https://api.github.com/repos/less/less.js/issues/2556","id":94276408,"user":{"login":"SLaks","id":313894,"avatar_url":"https://avatars.githubusercontent.com/u/313894?v=3","gravatar_id":"","url":"https://api.github.com/users/SLaks","html_url":"https://github.com/SLaks","followers_url":"https://api.github.com/users/SLaks/followers","following_url":"https://api.github.com/users/SLaks/following{/other_user}","gists_url":"https://api.github.com/users/SLaks/gists{/gist_id}","starred_url":"https://api.github.com/users/SLaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SLaks/subscriptions","organizations_url":"https://api.github.com/users/SLaks/orgs","repos_url":"https://api.github.com/users/SLaks/repos","events_url":"https://api.github.com/users/SLaks/events{/privacy}","received_events_url":"https://api.github.com/users/SLaks/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T13:20:02Z","updated_at":"2015-04-19T13:20:02Z","body":"I know; that's exactly what I want.  I want to define a new constant (which must have a unique name) in  each level of the call stack."}}