Using depth selector in vue2 can be used
Old version writing:
/deep/ a{
}
>>> a{
}
How to write it in vue3.x
New version writing:
.user-center {
&:deep(.test) {
...
}
}
If you still use the old one, you will be prompted
[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.
I read online that the depth selection of vue3 can still be used.::v-deep
After testing the ::v-deep effect, it works, but the warning is still issued as follows:
[@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead.
Practice has proved that if you follow the official prompts, people will get it right.:deep
Official description
https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md