Skip to content

Commit

Permalink
fix(sfc): remove sfc scoped deep syntax deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 11, 2022
1 parent 60d268c commit 2f335b2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions packages/compiler-sfc/src/stylePlugins/scoped.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PluginCreator, Rule, AtRule } from 'postcss'
import selectorParser from 'postcss-selector-parser'
import { warn } from '../warn'

const animationNameRE = /^(-\w+-)?animation-name$/
const animationRE = /^(-\w+-)?animation$/
Expand Down Expand Up @@ -94,10 +93,10 @@ function rewriteSelector(
) {
n.value = ' '
n.spaces.before = n.spaces.after = ''
warn(
`the >>> and /deep/ combinators have been deprecated. ` +
`Use :deep() instead.`
)
// warn(
// `the >>> and /deep/ combinators have been deprecated. ` +
// `Use :deep() instead.`
// )
return false
}

Expand Down Expand Up @@ -126,12 +125,12 @@ function rewriteSelector(
}
selector.removeChild(n)
} else {
// DEPRECATED usage
// DEPRECATED usage in v3
// .foo ::v-deep .bar -> .foo[xxxxxxx] .bar
warn(
`::v-deep usage as a combinator has ` +
`been deprecated. Use :deep(<inner-selector>) instead.`
)
// warn(
// `::v-deep usage as a combinator has ` +
// `been deprecated. Use :deep(<inner-selector>) instead.`
// )
const prev = selector.at(selector.index(n) - 1)
if (prev && isSpaceCombinator(prev)) {
selector.removeChild(prev)
Expand Down

0 comments on commit 2f335b2

Please sign in to comment.