{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/postcss-import/issues/83","labels_url":"https://api.github.com/repos/postcss/postcss-import/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/postcss/postcss-import/issues/83/comments","events_url":"https://api.github.com/repos/postcss/postcss-import/issues/83/events","html_url":"https://github.com/postcss/postcss-import/issues/83","id":106876233,"number":83,"title":"Sourcemap doesn't include @import'ed files","user":{"login":"Blindmikey","id":115122,"avatar_url":"https://avatars.githubusercontent.com/u/115122?v=3","gravatar_id":"","url":"https://api.github.com/users/Blindmikey","html_url":"https://github.com/Blindmikey","followers_url":"https://api.github.com/users/Blindmikey/followers","following_url":"https://api.github.com/users/Blindmikey/following{/other_user}","gists_url":"https://api.github.com/users/Blindmikey/gists{/gist_id}","starred_url":"https://api.github.com/users/Blindmikey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blindmikey/subscriptions","organizations_url":"https://api.github.com/users/Blindmikey/orgs","repos_url":"https://api.github.com/users/Blindmikey/repos","events_url":"https://api.github.com/users/Blindmikey/events{/privacy}","received_events_url":"https://api.github.com/users/Blindmikey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-16T22:25:45Z","updated_at":"2015-09-17T06:21:49Z","closed_at":"2015-09-17T04:23:15Z","body":"( Of course, unless I'm doing something incorrectly )\r\n\r\nSettings and files to reproduce:\r\n\r\nGruntfile.js :\r\n```js\r\n...\r\ngrunt.loadNpmTasks('grunt-postcss');\r\n...\r\npostcss: {\r\n\toptions: {\r\n\t\tmap: true,\r\n\t\tprocessors: [\r\n\t\t\trequire('postcss-import')({ path: [ '/lib/css/variables/' ] }),\r\n\t\t\trequire('postcss-simple-vars').postcss\r\n\t\t]\r\n\t},\r\n\tdist: {\r\n\t\tsrc: 'lib/css/init.css',\r\n\t\tdest: 'style.css'\r\n\t}\r\n},\r\n...\r\n```\r\nlib/css/init.css :\r\n```scss\r\n@import v-colors;\r\nbody { background-color : $v-colors_primary; }\r\n```\r\nlib/css/variables/v-colors.css :\r\n```scss\r\n$v-colors_primary : blue;\r\n```\r\n\r\nThe resulting sourcemap makes no mention of the file path to v-colors.css in \"sources\" array\r\n```\r\n{\"version\":3,\"sources\":[\"lib/css/init.css\"],\"names\":[],\"mappings\":\"AAEA;CACC,uBAAoC;CACpC\",\"file\":\"style.css\",\"sourcesContent\":[\"@import v-colors;\\n\\nbody {\\n\\tbackground-color: $v-colors_primary;\\n}\\n\"]}\r\n```\r\n\r\n**Issue 1**: This prevents chrome dev tools from auto-refreshing the styles on a page if a developer edits the imported file.\r\n\r\n**Issue 2**: This also prevents chrome dev tools' inspector from linking the css value of a property to the correct file so long as that file is one that was imported. ( links incorrectly to init.css, should link to v-colors.css as that's where the variable was assigned )"},"comment":{"url":"https://api.github.com/repos/postcss/postcss-import/issues/comments/140979164","html_url":"https://github.com/postcss/postcss-import/issues/83#issuecomment-140979164","issue_url":"https://api.github.com/repos/postcss/postcss-import/issues/83","id":140979164,"user":{"login":"jedmao","id":1058243,"avatar_url":"https://avatars.githubusercontent.com/u/1058243?v=3","gravatar_id":"","url":"https://api.github.com/users/jedmao","html_url":"https://github.com/jedmao","followers_url":"https://api.github.com/users/jedmao/followers","following_url":"https://api.github.com/users/jedmao/following{/other_user}","gists_url":"https://api.github.com/users/jedmao/gists{/gist_id}","starred_url":"https://api.github.com/users/jedmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedmao/subscriptions","organizations_url":"https://api.github.com/users/jedmao/orgs","repos_url":"https://api.github.com/users/jedmao/repos","events_url":"https://api.github.com/users/jedmao/events{/privacy}","received_events_url":"https://api.github.com/users/jedmao/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T06:21:49Z","updated_at":"2015-09-17T06:21:49Z","body":"I know that PostCSS does declaration source mapping, but I'm not sure it does values. See [`Node#clone()`](https://github.com/postcss/postcss/blob/master/docs/api.md#nodecloneprops) for example.\r\n\r\nAlso, how would you handle that in cases where you have multiple variables being called in a declaration value? Like:\r\n\r\n```css\r\na {\r\n    border: $width $style $color;\r\n}\r\n```\r\n\r\nI'd love to get this working with [`postcss-nested-vars`](https://github.com/jedmao/postcss-nested-vars) as well, whatever the solution may be."}}