Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
morphatic opened this issue Jul 26, 2019 · 5 comments
Labels
C: VBtn VBtn T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke

Comments

@morphatic
Copy link
Contributor

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 c5dae24d

@ghost ghost added the S: triage label Jul 26, 2019
@jacekkarczmarczyk jacekkarczmarczyk added C: VBtn VBtn T: bug Functionality that does not work as intended/expected and removed S: triage labels Jul 26, 2019
@nekosaur
Copy link
Member

Your assumption is correct. The change in css specificity that followed when adding .v-application to colors caused this bug.

@dsseng dsseng added the T: regression Something that used to work but we broke label Aug 6, 2019
@dsseng
Copy link
Contributor

dsseng commented Aug 7, 2019

Just a specifity issue

@dsseng dsseng closed this as completed in d1755df Aug 7, 2019
@phil-rw
Copy link

phil-rw commented Aug 14, 2019

Is this truly a bug? Our design purposefully keeps some color on disabled buttons (typically significantly lowers the opacity). By making the code change that this is related to which was introduced in 2.0.6, it appears we've lost the ability to specify any colors for disabled state. Would Vuetify be willing to remove this and be less opinionated on this manner?

@morphatic
Copy link
Contributor Author

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

@phil-rw
Copy link

phil-rw commented Aug 15, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VBtn VBtn T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke
Projects
None yet
Development

No branches or pull requests

5 participants