{"action":"opened","issue":{"url":"https://api.github.com/repos/postcss/postcss-mixins/issues/86","repository_url":"https://api.github.com/repos/postcss/postcss-mixins","labels_url":"https://api.github.com/repos/postcss/postcss-mixins/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/postcss/postcss-mixins/issues/86/comments","events_url":"https://api.github.com/repos/postcss/postcss-mixins/issues/86/events","html_url":"https://github.com/postcss/postcss-mixins/issues/86","id":326698959,"number":86,"title":"postcss-simple-vars not working","user":{"login":"catamphetamine","id":477167,"avatar_url":"https://avatars0.githubusercontent.com/u/477167?v=4","gravatar_id":"","url":"https://api.github.com/users/catamphetamine","html_url":"https://github.com/catamphetamine","followers_url":"https://api.github.com/users/catamphetamine/followers","following_url":"https://api.github.com/users/catamphetamine/following{/other_user}","gists_url":"https://api.github.com/users/catamphetamine/gists{/gist_id}","starred_url":"https://api.github.com/users/catamphetamine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catamphetamine/subscriptions","organizations_url":"https://api.github.com/users/catamphetamine/orgs","repos_url":"https://api.github.com/users/catamphetamine/repos","events_url":"https://api.github.com/users/catamphetamine/events{/privacy}","received_events_url":"https://api.github.com/users/catamphetamine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-26T01:19:29Z","updated_at":"2018-05-26T01:19:29Z","closed_at":null,"author_association":"NONE","body":"If I place `postcss-simple-vars` before `postcss-mixins` it throws:\r\n\r\n```js\r\nUndefined variable $infix\r\n\r\n  62 | // https://github.com/twbs/bootstrap/blob/76d8291e3846d95b40dc4509a2e1bf36b0681a28/dist/css/bootstrap-grid.css\r\n  63 |\r\n> 64 | @define-mixin define_columns $infix\r\n     | ^\r\n  65 | {\r\n  66 |  // http://getbootstrap.com.vn/examples/equal-height-columns/\r\n```\r\n\r\nSo it tries to interpret the mixin argument as a standalone variable.\r\n\r\nThen I place `postcss-simple-vars` after `postcss-mixins` and it outputs for such source code:\r\n\r\n```css\r\n|$screen-sm-min : calc($grid-unit * 64); // 768px\r\n$screen-xs-max : calc($screen-sm-min - 1);\r\n$screen-md-min : calc($grid-unit * 82); // 984px\r\n$screen-sm-max : calc($screen-md-min - 1);\r\n$screen-lg-min : calc($grid-unit * 100); // 1200px\r\n$screen-md-max : calc($screen-lg-min - 1);\r\n\r\n@define-mixin xs\r\n{\r\n  @media all and (max-width: $screen-xs-max)\r\n  {\r\n    @mixin-content;\r\n  }\r\n}\r\n```\r\n\r\n```css\r\n.title\r\n{\r\n  @mixin xs\r\n  {\r\n    color: red;\r\n  }\r\n}\r\n```\r\n\r\n```css\r\n@media (max-width: calc(12px * 64))\r\n{\r\n  .title\r\n  {\r\n    color: red;\r\n  }\r\n}\r\n```\r\n\r\nWhich doesn't work because `calc()` doesn't work inside a media query."}}
{"actor":{"display_login":"catamphetamine"}}