question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] Text color does not change for disabled button w/ >1 text color property

See original GitHub issue

Environment

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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
phil-rwcommented, Aug 15, 2019

Got it! Thank you for the detailed explanation @morphatic - makes sense. 👍

0reactions
morphaticcommented, Aug 14, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found