DEV Community

Apple Sun
Apple Sun

Posted on

Answer: How do I use /deep/ or >>> or ::v-deep in Vue.js?

Vue 2

The following also works in Vue 3 but is deprecated.

Sass:   Use ::v-deep

::v-deep .child-class {
    background-color: #000
}

Not using Sass:   Use >>>

>>> .child-class {
    background-color: #000;
}

With either syntax, the <style> tag for this component must be scoped:

<style scoped>

Vue 3 (Updated

Top comments (0)