{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/postcss/issues/882","repository_url":"https://api.github.com/repos/postcss/postcss","labels_url":"https://api.github.com/repos/postcss/postcss/issues/882/labels{/name}","comments_url":"https://api.github.com/repos/postcss/postcss/issues/882/comments","events_url":"https://api.github.com/repos/postcss/postcss/issues/882/events","html_url":"https://github.com/postcss/postcss/issues/882","id":176047862,"number":882,"title":"Incorrect position on minified css with sourcemaps","user":{"login":"roose","id":277651,"avatar_url":"https://avatars.githubusercontent.com/u/277651?v=3","gravatar_id":"","url":"https://api.github.com/users/roose","html_url":"https://github.com/roose","followers_url":"https://api.github.com/users/roose/followers","following_url":"https://api.github.com/users/roose/following{/other_user}","gists_url":"https://api.github.com/users/roose/gists{/gist_id}","starred_url":"https://api.github.com/users/roose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roose/subscriptions","organizations_url":"https://api.github.com/users/roose/orgs","repos_url":"https://api.github.com/users/roose/repos","events_url":"https://api.github.com/users/roose/events{/privacy}","received_events_url":"https://api.github.com/users/roose/received_events","type":"User","site_admin":false},"labels":[{"id":57904550,"url":"https://api.github.com/repos/postcss/postcss/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-09T16:11:24Z","updated_at":"2016-12-31T00:41:16Z","closed_at":null,"body":"In Firefox devtools on inspect `body` I see `base.css:3` not `header.css:3`.\nIf styles not minified all ok, in Chrome devtools all ok in both case.\nIf I add custom selector e.g. `.nothing {color:#000}` in the top of `header.css` Firefox shown: `header.css:1`, but really selector on position 2.\n\nWindows 10\nnodejs v6.2.2\ngulp v3.9.1\n\nGulp task:\n\n``` js\ngulp.task('css', () => {\n  const processors = [\n    precss(),\n    autoprefixer({browsers: ['last 2 versions']}),\n    csswring\n  ];\n  return gulp.src('src/css/main.css')\n    .pipe($.sourcemaps.init())\n    .pipe($.postcss(processors))\n    .pipe($.sourcemaps.write('.'))\n    .pipe(gulp.dest('dist/css'))\n});\n```\n\nmain:css:\n\n``` css\n$blue: #056ef0;\n@import \"base.css\";\n@import \"parts/header.css\";\n```\n\nbase.css:\n\n``` css\na {\n  color: $blue;\n}\n```\n\nheader.css:\n\n``` css\nbody {\n  background: $blue;\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/postcss/postcss/issues/comments/269839601","html_url":"https://github.com/postcss/postcss/issues/882#issuecomment-269839601","issue_url":"https://api.github.com/repos/postcss/postcss/issues/882","id":269839601,"user":{"login":"bcole808","id":5074711,"avatar_url":"https://avatars.githubusercontent.com/u/5074711?v=3","gravatar_id":"","url":"https://api.github.com/users/bcole808","html_url":"https://github.com/bcole808","followers_url":"https://api.github.com/users/bcole808/followers","following_url":"https://api.github.com/users/bcole808/following{/other_user}","gists_url":"https://api.github.com/users/bcole808/gists{/gist_id}","starred_url":"https://api.github.com/users/bcole808/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcole808/subscriptions","organizations_url":"https://api.github.com/users/bcole808/orgs","repos_url":"https://api.github.com/users/bcole808/repos","events_url":"https://api.github.com/users/bcole808/events{/privacy}","received_events_url":"https://api.github.com/users/bcole808/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T00:41:16Z","updated_at":"2016-12-31T00:41:16Z","body":"+1, I am having a similar problem. \r\n\r\nI use grunt-sass to first compile our SCSS into CSS files, then I use grunt-postcss to do autoprefixer and cssnano and I have noticed that:\r\n\r\n- Sourcemaps output from just grunt-sass have correct line numbers\r\n- Sourcemaps output from grunt-postcss often have incorrect line numbers, like 1\r\n\r\nThis is basically my configuration in grunt:\r\n\r\n```\r\nsass: {\r\n    options: {\r\n        sourceMap: true,\r\n        outputStyle: 'compact',\r\n        includePaths: ['assets/styles']\r\n    },\r\n    dist: {\r\n        files: {\r\n            'assets/main.min.css' : 'assets/styles/main.scss',\r\n        }\r\n    }\r\n},\r\n\r\n postcss: {\r\n    options: {\r\n        map: true,\r\n        processors: [\r\n            require('autoprefixer')({\r\n                browsers: ['last 4 versions']\r\n            }),\r\n            require('cssnano')()\r\n        ]\r\n    },\r\n    dist: {\r\n        src: ['assets/*.css']\r\n    }\r\n},\r\n```"}}
{"actor":{"display_login":"bcole808"}}