Using v-deep in Vue 2.7+

Published 
JavaScript

Starting with Vue 2.7+, the use of ::v-deep as a combinator was deprecated, and the recommended method to deep select in scoped styles was to use :deep(<inner-selector>)​​. This replaced the previous approach of using ::v-deep in Sass or >>> without Sass​2. Here is an example of how you can use :deep() in Vue 2.7+:

:deep(.child-class) {
  background-color: #000;
}

Please note

Remember that the "style" tag for this component must be scoped, otherwise it won't work

In addition to :deep(), Vue 3 introduced two new selectors, :slotted and :global. The :slotted selector allows you to style content passed into a component via a <slot>, and the :global selector allows you to register global styles even from a scoped component.

In summary, the way you use v-deep has changed from Vue 2.7+. While it was used as a combinator in earlier versions, it is now used as an alias for the :deep() pseudo-class function, allowing you to select nested elements within a scoped style.