{"action":"created","issue":{"url":"https://api.github.com/repos/MadLittleMods/postcss-css-variables/issues/2","labels_url":"https://api.github.com/repos/MadLittleMods/postcss-css-variables/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/MadLittleMods/postcss-css-variables/issues/2/comments","events_url":"https://api.github.com/repos/MadLittleMods/postcss-css-variables/issues/2/events","html_url":"https://github.com/MadLittleMods/postcss-css-variables/issues/2","id":73098524,"number":2,"title":"very cool, but incorrect while overriding","user":{"login":"tunnckoCore","id":5038030,"avatar_url":"https://avatars.githubusercontent.com/u/5038030?v=3","gravatar_id":"","url":"https://api.github.com/users/tunnckoCore","html_url":"https://github.com/tunnckoCore","followers_url":"https://api.github.com/users/tunnckoCore/followers","following_url":"https://api.github.com/users/tunnckoCore/following{/other_user}","gists_url":"https://api.github.com/users/tunnckoCore/gists{/gist_id}","starred_url":"https://api.github.com/users/tunnckoCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunnckoCore/subscriptions","organizations_url":"https://api.github.com/users/tunnckoCore/orgs","repos_url":"https://api.github.com/users/tunnckoCore/repos","events_url":"https://api.github.com/users/tunnckoCore/events{/privacy}","received_events_url":"https://api.github.com/users/tunnckoCore/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-04T18:57:30Z","updated_at":"2015-05-05T14:55:51Z","closed_at":"2015-05-05T14:50:05Z","body":"At first.. lib is awesome!\r\n\r\n**But** I think following output for that fixture isn't correct.\r\n\r\n```css\r\n:root {\r\n    --some-width: 150px;\r\n}\r\n\r\n.box-foo {\r\n    --some-width: 333px;\r\n    width: var(--some-width);\r\n\r\n    .box-bar {\r\n        width: var(--some-width);\r\n    }\r\n}\r\n\r\n@media (max-width: 800px) {\r\n    .box-foo {\r\n        --some-width: 300px;\r\n    }\r\n}\r\n```\r\noutput\r\n```css\r\n.box-foo {\r\n    width: 333px;\r\n\r\n    .box-bar {\r\n        width: 333px;\r\n    }\r\n\r\n    @media (max-width: 800px) {\r\n\r\n        .box-bar {\r\n            width: 300px; /* here should be also 333px */\r\n        }\r\n    }\r\n}\r\n\r\n@media (max-width: 800px) {\r\n    .box-foo {\r\n        width: 300px;\r\n    }\r\n}\r\n```\r\nnotice the `.box-bar` in media query. I think it should be 333px, not 300px as defined in box-foo media query?"},"comment":{"url":"https://api.github.com/repos/MadLittleMods/postcss-css-variables/issues/comments/99104177","html_url":"https://github.com/MadLittleMods/postcss-css-variables/issues/2#issuecomment-99104177","issue_url":"https://api.github.com/repos/MadLittleMods/postcss-css-variables/issues/2","id":99104177,"user":{"login":"MadLittleMods","id":558581,"avatar_url":"https://avatars.githubusercontent.com/u/558581?v=3","gravatar_id":"","url":"https://api.github.com/users/MadLittleMods","html_url":"https://github.com/MadLittleMods","followers_url":"https://api.github.com/users/MadLittleMods/followers","following_url":"https://api.github.com/users/MadLittleMods/following{/other_user}","gists_url":"https://api.github.com/users/MadLittleMods/gists{/gist_id}","starred_url":"https://api.github.com/users/MadLittleMods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadLittleMods/subscriptions","organizations_url":"https://api.github.com/users/MadLittleMods/orgs","repos_url":"https://api.github.com/users/MadLittleMods/repos","events_url":"https://api.github.com/users/MadLittleMods/events{/privacy}","received_events_url":"https://api.github.com/users/MadLittleMods/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T14:55:51Z","updated_at":"2015-05-05T14:55:51Z","body":"@tunnckoCore Fixed in the latest v0.3.1 release.\r\n\r\nAdded test to make sure we don't regress: [`./test/fixtures/cascade-on-nested-rules-in-proper-scope.css`](https://github.com/MadLittleMods/postcss-css-variables/blob/e280eeea38d7bce140969148c765ede9c0497c9f/test/fixtures/cascade-on-nested-rules-in-proper-scope.css)\r\n\r\n---\r\n---\r\n\r\nInput:\r\n```\r\n:root {\r\n    --some-width: 150px;\r\n}\r\n\r\n.box-foo {\r\n    --some-width: 333px;\r\n    width: var(--some-width);\r\n\r\n    .box-bar {\r\n        width: var(--some-width);\r\n    }\r\n}\r\n\r\n.box-baz {\r\n    --some-width: 200px;\r\n    width: var(--some-width);\r\n}\r\n\r\n@media (max-width: 800px) {\r\n    .box-baz {\r\n        --some-width: 550px;\r\n    }\r\n}\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n.box-foo {\r\n    width: 333px;\r\n\r\n    .box-bar {\r\n        width: 333px;\r\n    }\r\n}\r\n\r\n.box-baz {\r\n    width: 200px;\r\n}\r\n\r\n@media (max-width: 800px) {\r\n\r\n    .box-baz {\r\n        width: 550px;\r\n    }\r\n}\r\n```\r\n\r\n"}}