{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/autoprefixer/issues/783","repository_url":"https://api.github.com/repos/postcss/autoprefixer","labels_url":"https://api.github.com/repos/postcss/autoprefixer/issues/783/labels{/name}","comments_url":"https://api.github.com/repos/postcss/autoprefixer/issues/783/comments","events_url":"https://api.github.com/repos/postcss/autoprefixer/issues/783/events","html_url":"https://github.com/postcss/autoprefixer/issues/783","id":205506064,"number":783,"title":"Incorrect source maps with sass output style set to compressed","user":{"login":"JoshMoreno","id":22627952,"avatar_url":"https://avatars.githubusercontent.com/u/22627952?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshMoreno","html_url":"https://github.com/JoshMoreno","followers_url":"https://api.github.com/users/JoshMoreno/followers","following_url":"https://api.github.com/users/JoshMoreno/following{/other_user}","gists_url":"https://api.github.com/users/JoshMoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshMoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshMoreno/subscriptions","organizations_url":"https://api.github.com/users/JoshMoreno/orgs","repos_url":"https://api.github.com/users/JoshMoreno/repos","events_url":"https://api.github.com/users/JoshMoreno/events{/privacy}","received_events_url":"https://api.github.com/users/JoshMoreno/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-02-06T07:30:17Z","updated_at":"2017-02-06T14:38:16Z","closed_at":"2017-02-06T08:05:46Z","body":"When I compile sass using `outputStyle: 'compressed'` in conjunction with autoprefixer, the source map becomes inaccurate. \r\n\r\nIf I set the `outputStyle` to any of the other 3 options, the source map is fine. \r\n\r\nIf I leave it set to `compressed` and remove autoprefixer from the task, the source map is fine.\r\n\r\n# Bug Demo\r\n### Download -  [autoprefixer-bug.zip](https://github.com/postcss/autoprefixer/files/753843/autoprefixer-bug.zip)\r\n\r\nRun `npm install`\r\n\r\nThen `gulp not-working`\r\n\r\nOpen `index.html` and inspect `#footer`\r\n\r\nIt should be pointing to the `_header.scss` file... which is wrong.\r\n\r\nNow run `gulp working`\r\n\r\nRefresh page and inspect `#footer`\r\n\r\nIt should be pointing to `_footer.scss` which is correct\r\n\r\n## Source Code\r\n\r\n### package.json\r\n```\r\n{\r\n  \"name\": \"autoprefixer-bug\",\r\n  \"version\": \"1.0.0\",\r\n  \"devDependencies\": {\r\n    \"autoprefixer\": \"^6.7.2\",\r\n    \"gulp\": \"^3.9.1\",\r\n    \"gulp-postcss\": \"^6.3.0\",\r\n    \"gulp-sass\": \"^3.1.0\",\r\n    \"gulp-sourcemaps\": \"^2.4.1\"\r\n  }\r\n}\r\n```\r\n\r\n### gulpfile.js\r\n```\r\n'use strict';\r\n\r\nvar gulp         = require('gulp');\r\nvar sass         = require('gulp-sass');\r\nvar sourcemaps   = require('gulp-sourcemaps');\r\nvar postcss      = require('gulp-postcss');\r\nvar autoprefixer = require('autoprefixer');\r\n\r\ngulp.task('working', function(){\r\n\treturn gulp\r\n\t\t.src('sass/main.scss')\r\n\t\t.pipe(sourcemaps.init())\r\n\t\t.pipe(sass({outputStyle: 'compressed'}))\r\n\t\t.pipe(sourcemaps.write('.'))\r\n\t\t.pipe(gulp.dest('css'));\r\n});\r\n\r\ngulp.task('not-working', function(){\r\n\treturn gulp\r\n\t\t.src('sass/main.scss')\r\n\t\t.pipe(sourcemaps.init())\r\n\t\t.pipe(sass({outputStyle: 'compressed'}))\r\n\t\t.pipe(postcss([autoprefixer()]))\r\n\t\t.pipe(sourcemaps.write('.'))\r\n\t\t.pipe(gulp.dest('css'));\r\n});\r\n```\r\n\r\n### main.scss\r\n```\r\n@import 'header';\r\n@import 'footer';\r\n```\r\n\r\n**_header.scss**\r\n```\r\n#header {\r\n  background: #000;\r\n}\r\n```\r\n\r\n### _footer.scss\r\n```\r\n#footer{\r\n  background: red;\r\n}\r\n\r\n```\r\n\r\n\r\nIf you need more info just let me know. Thanks!"},"comment":{"url":"https://api.github.com/repos/postcss/autoprefixer/issues/comments/277700633","html_url":"https://github.com/postcss/autoprefixer/issues/783#issuecomment-277700633","issue_url":"https://api.github.com/repos/postcss/autoprefixer/issues/783","id":277700633,"user":{"login":"JoshMoreno","id":22627952,"avatar_url":"https://avatars.githubusercontent.com/u/22627952?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshMoreno","html_url":"https://github.com/JoshMoreno","followers_url":"https://api.github.com/users/JoshMoreno/followers","following_url":"https://api.github.com/users/JoshMoreno/following{/other_user}","gists_url":"https://api.github.com/users/JoshMoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshMoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshMoreno/subscriptions","organizations_url":"https://api.github.com/users/JoshMoreno/orgs","repos_url":"https://api.github.com/users/JoshMoreno/repos","events_url":"https://api.github.com/users/JoshMoreno/events{/privacy}","received_events_url":"https://api.github.com/users/JoshMoreno/received_events","type":"User","site_admin":false},"created_at":"2017-02-06T14:38:16Z","updated_at":"2017-02-06T14:38:16Z","body":"Ah bummer. Good for you though! \r\n\r\nThere's no hack to get this working or a way to use autoprefixer without postcss is there?\r\n"}}
{"actor":{"display_login":"JoshMoreno"}}