{"action":"created","issue":{"url":"https://api.github.com/repos/OEvgeny/postcss-atroot/issues/2","labels_url":"https://api.github.com/repos/OEvgeny/postcss-atroot/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/OEvgeny/postcss-atroot/issues/2/comments","events_url":"https://api.github.com/repos/OEvgeny/postcss-atroot/issues/2/events","html_url":"https://github.com/OEvgeny/postcss-atroot/issues/2","id":115792362,"number":2,"title":"problem with precss","user":{"login":"mushiuta","id":13121638,"avatar_url":"https://avatars.githubusercontent.com/u/13121638?v=3","gravatar_id":"","url":"https://api.github.com/users/mushiuta","html_url":"https://github.com/mushiuta","followers_url":"https://api.github.com/users/mushiuta/followers","following_url":"https://api.github.com/users/mushiuta/following{/other_user}","gists_url":"https://api.github.com/users/mushiuta/gists{/gist_id}","starred_url":"https://api.github.com/users/mushiuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushiuta/subscriptions","organizations_url":"https://api.github.com/users/mushiuta/orgs","repos_url":"https://api.github.com/users/mushiuta/repos","events_url":"https://api.github.com/users/mushiuta/events{/privacy}","received_events_url":"https://api.github.com/users/mushiuta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-09T04:54:01Z","updated_at":"2015-11-09T07:24:18Z","closed_at":null,"body":"there has a problem with precss,when i use '@at-root' like you has said it doesn't work\r\nthis is the postcss file:\r\n```postcss\r\n.test{\r\n  color:red;\r\n  @at-root{\r\n    .test2{\r\n      color:blue;\r\n    }\r\n  }\r\n}\r\n```\r\nand then the output file:\r\n```css\r\n.test{\r\n  color:red;\r\n  @at-root{\r\n    .test2{\r\n      color:blue;\r\n    }\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/OEvgeny/postcss-atroot/issues/comments/154978232","html_url":"https://github.com/OEvgeny/postcss-atroot/issues/2#issuecomment-154978232","issue_url":"https://api.github.com/repos/OEvgeny/postcss-atroot/issues/2","id":154978232,"user":{"login":"OEvgeny","id":2841858,"avatar_url":"https://avatars.githubusercontent.com/u/2841858?v=3","gravatar_id":"","url":"https://api.github.com/users/OEvgeny","html_url":"https://github.com/OEvgeny","followers_url":"https://api.github.com/users/OEvgeny/followers","following_url":"https://api.github.com/users/OEvgeny/following{/other_user}","gists_url":"https://api.github.com/users/OEvgeny/gists{/gist_id}","starred_url":"https://api.github.com/users/OEvgeny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OEvgeny/subscriptions","organizations_url":"https://api.github.com/users/OEvgeny/orgs","repos_url":"https://api.github.com/users/OEvgeny/repos","events_url":"https://api.github.com/users/OEvgeny/events{/privacy}","received_events_url":"https://api.github.com/users/OEvgeny/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T07:24:18Z","updated_at":"2015-11-09T07:24:18Z","body":"I did some tests. Looks like problem is in precss. Because:\r\n```js\r\nvar postcss = require('postcss')\r\nvar precss = require('precss')\r\nvar scss = require('postcss-scss')\r\n\r\nvar css = postcss([precss()]).process(`\r\n.test{\r\n  color:red;\r\n  @at-root{\r\n    .test2{\r\n      color:blue;\r\n    }\r\n  }\r\n}\r\n`, {parser: scss}).then(result => {\r\n  console.log('precss', result.css)\r\n})\r\n```\r\nProduces:\r\n```css\r\nprecss \r\n.test{\r\n  color:red;\r\n  @at-root{\r\n    .test2{\r\n      color:blue;\r\n    }\r\n  }\r\n}\r\n\r\n```\r\n\r\nBut\r\n```js\r\nvar atRoot = require('postcss-atroot')\r\n\r\ncss = postcss([atRoot()]).process(`\r\n.test{\r\n  color:red;\r\n  @at-root{\r\n    .test2{\r\n      color:blue;\r\n    }\r\n  }\r\n}\r\n`).then(result => {\r\n  console.log('atroot only', result.css)\r\n})\r\n```\r\n\r\nWorks well:\r\n```css\r\natroot only .test2{\r\n  color:blue\r\n}\r\n.test{\r\n  color:red\r\n}\r\n```"}}