[Bug Report] Text color does not change for disabled button w/ >1 text color property
See original GitHub issueEnvironment
Vuetify Version: 2.0.1 Vue Version: 2.6.10 Browsers: Chrome 75.0.3770.100 OS: Mac OS 10.13.6
Steps to reproduce
Create a <v-btn>
instance. Assign multiple text color modifiers. Disable it, e.g.
<v-btn
color="primary--text text--darken-2"
:disabled="true"
/>
Expected Behavior
The text of the button gets greyed out.
Actual Behavior
The text of the button does not change color.
Reproduction Link
https://codepen.io/morphatic/pen/eqJwEP
Other comments
May have been caused by and/or be related to https://github.com/vuetifyjs/vuetify/commit/c5dae24d
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Change fore color of a disabled Button - MSDN - Microsoft
No, the fore color of a disabled button can not be changed. There is a fixed style of disabled button, visual studio does...
Read more >Disabled property does not change the color in Google Chrome
in IE it changes the button text color black to gray if i set disabled. but in chrome it works fine but does...
Read more ><color> - CSS: Cascading Style Sheets - MDN Web Docs
This lets you use the color value on properties that do not receive it by default. If currentcolor is used as the value...
Read more >Color - Foundations - Human Interface Guidelines - Design
Avoid using colors that make it hard to perceive content in your app. For example, insufficient contrast can cause icons and text to...
Read more >CSS Buttons - W3Schools
.button4 {background-color: #e7e7e7; color: black;} /* Gray */ ... Use the font-size property to change the font size of a button: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got it! Thank you for the detailed explanation @morphatic - makes sense. 👍
Yes, it is a bug because it deviates from the official Material 2.0 spec for button styles. Vuetify specifically aims to hew as close to this spec as possible. The spec is clear and explicit about what the disabled state should look like for all button styles. It’s totally fine if you want to deviate from the spec in your own app, but the buggy version unexpectedly fails to grey out the button text when developers specify colors with more than one rule.
You’re still able to override the default style with your own custom CSS. Here’s an (admittedly awful to look at) example using the latest, non-buggy version: https://codepen.io/morphatic/pen/jONWeEG