@@ -44,9 +44,10 @@ export default postcss.plugin('vue-scoped', (options: any) => (root: Root) => {
44
44
}
45
45
46
46
if ( n . type === 'pseudo' ) {
47
+ const { value } = n
47
48
// deep: inject [id] attribute at the node before the ::v-deep
48
49
// combinator.
49
- if ( n . value === '::v-deep' ) {
50
+ if ( value === ':deep' || value === '::v-deep' ) {
50
51
if ( n . nodes . length ) {
51
52
// .foo ::v-deep(.bar) -> .foo[xxxxxxx] .bar
52
53
// replace the current node with ::v-deep's inner selector
@@ -81,7 +82,7 @@ export default postcss.plugin('vue-scoped', (options: any) => (root: Root) => {
81
82
// slot: use selector inside `::v-slotted` and inject [id + '-s']
82
83
// instead.
83
84
// ::v-slotted(.foo) -> .foo[xxxxxxx-s]
84
- if ( n . value === '::v-slotted' ) {
85
+ if ( value === ':slotted' || value === '::v-slotted' ) {
85
86
rewriteSelector ( n . nodes [ 0 ] as Selector , true /* slotted */ )
86
87
selector . insertAfter ( n , n . nodes [ 0 ] )
87
88
selector . removeChild ( n )
@@ -93,7 +94,7 @@ export default postcss.plugin('vue-scoped', (options: any) => (root: Root) => {
93
94
94
95
// global: replace with inner selector and do not inject [id].
95
96
// ::v-global(.foo) -> .foo
96
- if ( n . value === '::v-global' ) {
97
+ if ( value === ':global' || n . value === '::v-global' ) {
97
98
selectors . insertAfter ( selector , n . nodes [ 0 ] )
98
99
selectors . removeChild ( selector )
99
100
return false
0 commit comments