mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
fix(sfc): remove sfc scoped deep syntax deprecation warnings
This commit is contained in:
parent
60d268c426
commit
2f335b2f9d
@ -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$/
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user