Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vuetify styles not applied when styles inside scoped

I am usig Vue.js in this i am applied inspect v-data-table claSS BASED I gave styles but not applying.

<style lang="scss" scoped>
.v-toolbar__title {
  color: indigo;
}
v-data-table-header{
  background:  rgba(0, 0, 0, .05);
}

tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, .05);
}
</style>
like image 652
Lavaraju Avatar asked Nov 15 '25 22:11

Lavaraju


1 Answers

You need to use ::v-deep to change scoped styles

Try

::v-deep .v-data-table-header{
  background:  rgba(0, 0, 0, .05);
}

Read more about deep selectors here - https://vue-loader.vuejs.org/guide/scoped-css.html#deep-selectors

like image 52
Satyam Pathak Avatar answered Nov 18 '25 16:11

Satyam Pathak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!