Fix disabled menu item button styles#16581
Merged
Merged
Conversation
da4589d to
63d2574
Compare
Contributor
|
Thanks for catching this Dan! I was trying to think about where else this opacity change might occur and didn't even consider this one. Thanks for the fix! 👍 I tested this PR, and it works as expected. Let's get this in. |
tellthemachines
approved these changes
Jul 18, 2019
youknowriad
reviewed
Jul 26, 2019
| .components-menu-item__button { | ||
| &:disabled, | ||
| &[aria-disabled="true"] { | ||
| opacity: 0.3; |
Contributor
There was a problem hiding this comment.
Was this fixed in a more global way @aduth? Should we revert that change in that case as it becomes unnecessary styles?
Member
There was a problem hiding this comment.
Yes, this treats a symptom of the root issue which is that, as of #16103 (#16103 (comment)), we have no disabled stying for buttons.
I think the changes there (at least this one line) should be reverted, or find another way which treats exceptions to default disabled styling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This is a small fix for a visual regression introduced in #16103.
In that PR an opacity of 0.3 that was applied to any disabled button was removed. This caused disabled menu items to no longer appear disabled. This screenshot shows a menu with some enabled and some disabled menu items when that opacity is no longer present:
This PR reintroduces that opacity style, but only for menu items:

How has this been tested?
Expected (in this branch)
Buttons in the dropdown menu appear greyed out.
Actual (in master)
Buttons in the dropdown menu appear active, but cannot be clicked on or interacted with
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: