postcss-sass
postcss-sass copied to clipboard
Fix media query processing
There is an issue with how postcss-sass
processes media queries.
It makes it impossible to use with stylelint. See the issue there.
The source should not return undefined
:
> require('postcss-sass').parse('@media(max-width: 40rem)\n color: red').nodes[0].source
undefined
> require('postcss-scss').parse('@media(max-width: 40rem) { color: red }').nodes[0].source
{
input: Input {
css: '@media(max-width: 40rem) { color: red }',
hasBOM: false,
id: '<input css FGAgvV>',
[Symbol(fromOffsetCache)]: [ 0 ]
},
start: { column: 1, line: 1, offset: 0 },
end: { column: 39, line: 1, offset: 38 }
}