Vue 3 ::v-deep usage as a combinator has been deprecated. Use ::v-deep(<inner-selector>) instead

Viewed 30777

I started getting the following warning in Vue 3 with the ::v-deep usage.

::v-deep usage as a combinator has been deprecated. Use ::v-deep(<inner-selector>) instead

The CSS looks like as follows:

.parent ::v-deep .child {
   ...
}

What's the correct way to use suggested option ::v-deep(<inner-selector>)?

3 Answers

Little update: now, you need to change it to:

.parent :deep(.child) {

This issue also occurs in Vue 2.7

[@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead.

I I think neither of the solutions above solve that warning.

Edited working using:

:deep() {
  .class {}
}

But it finds error in npm dependencies as well

Related