-1

I want to apply custom CSS and override some default Vuetify colors. For example, success button can be easily overridden:

.success-button {
  background-color: $sb--color-success !important;
}

But is there a way to do the same without using !important? I tried both:

body .success-button {
    background-color: $sb--color-success;
}

button .success-button {
  background-color: $sb--color-success;
}

How to do it without !important?

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Desiigner
  • 2,136
  • 5
  • 26
  • 47
  • Vuetify uses colors with `!important` by default, you need `!important` to override other important rules – Ferrybig Feb 05 '19 at 09:59
  • Your question is too broad. What are you trying to do? Replace the default color (theme)? Or you can use different values in `.styl`... Or learn more about specificity if specificity is the issue https://stackoverflow.com/a/51728504/1981247 These questions have likely been answered (or is explained in the docs), but impossible to know what do you want. – Traxo Feb 05 '19 at 14:44

1 Answers1

1

You can try something along this lines

// src/index.js

// Libraries
import Vue from 'vue'
import Vuetify from 'vuetify'

    // Helpers
    import colors from 'vuetify/es5/util/colors'

    Vue.use(Vuetify, {
      theme: {
        primary: colors.red.darken1, // #E53935
        secondary: colors.red.lighten4, // #FFCDD2
        accent: colors.indigo.base // #3F51B5
      }
    })

Or something like this

 <h1 class="subheading grey--text">DASHBOARD</h1>
Svinjica
  • 2,389
  • 2
  • 37
  • 66