Skip to content

Commit c303312

Browse files
committed
fix: avoid removing space after /deep/ when used directly (close #1035)
1 parent 153d237 commit c303312

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/style-compiler/plugins/scope-id.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ module.exports = postcss.plugin('add-id', ({ id }) => root => {
2929
}
3030
// /deep/ alias for >>>, since >>> doesn't work in SASS
3131
if (n.type === 'tag' && n.value === '/deep/') {
32-
const next = n.next()
33-
if (next.type === 'combinator' && next.value === ' ') {
34-
next.remove()
32+
const prev = n.prev()
33+
if (prev && prev.type === 'combinator' && prev.value === ' ') {
34+
prev.remove()
3535
}
3636
n.remove()
3737
return false

0 commit comments

Comments
 (0)