vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.95k stars 6.97k forks source link

[Bug Report][3.5.14] Unable to add a class to v-btn-toggle > v-btn through Vuetify defaults #20209

Closed simionato-mobisec closed 4 months ago

simionato-mobisec commented 4 months ago

Environment

Vuetify Version: 3.5.14 Vue Version: 3.4.21 Browsers: Firefox 128.0 OS: Ubuntu undefined

Steps to reproduce

  1. Add following class to your main.css
    .custom {
    font-size: 30px !important;
    }
  2. Update Vutify defaults
    defaults: {
    VBtnToggle: {
    VBtn: {
      class: 'custom'
    }
    }
    }
  3. Create a v-btn-toggle with two v-btn inside of it.

Expected Behavior

v-btn font size changes.

Actual Behavior

v-btn font-size doesn't change.

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

The reproduction link is incomplete cause I didn't know how to include a CSS file.

KaelWD commented 4 months ago

The class is applied, your css just isn't specific enough to override the default size.

https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade#cascading_order