Limit active disabled button styles to default button#6744
Merged
Conversation
**Why**: Because the styling was only implemented with the expectation of use with the default button, and conflicts with other button states (e.g. unstyled buttons used as the submit buttons on some forms). Previously: #6564 changelog: Improvements, Forms, Use pressed state appearance for buttons disabled on form submission
aduth
commented
Aug 15, 2022
Comment on lines
-13
to
-24
|
|
||
| // Temporary: To be backported to design system. Unstyled buttons should not ever show the default | ||
| // opaque disabled background color. Typically a button would not be both disabled and active, but | ||
| // it is possible in some browsers when e.g. disabling a button in response to its own click. | ||
| &.usa-button:disabled:hover, | ||
| &.usa-button:disabled.usa-button--hover, | ||
| &.usa-button:disabled:active, | ||
| &.usa-button:disabled.usa-button--active, | ||
| &.usa-button:disabled:focus, | ||
| &.usa-button:disabled.usa-focus { | ||
| background-color: transparent; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This was patched upstream in uswds/uswds#4077 , available as of USWDS 2.11.2 / identity-style-guide@6.0.0.
aduth
commented
Aug 15, 2022
| .usa-button:disabled.usa-button--active, | ||
| .usa-button--disabled.usa-button--active { | ||
| @include set-text-and-bg('primary-darker', $context: 'Button'); | ||
| &:not(.usa-button--unstyled, .usa-button--secondary, .usa-button--accent-cool, .usa-button--accent-warm, .usa-button--base, .usa-button--outline, .usa-button--inverse) { |
Contributor
Author
There was a problem hiding this comment.
Ideally each of these button variants would just override the base like they do with the standard styles. Might be worth exploring that if / when backporting to the design system.
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.
Fixes regression introduced in #6564
Why: Because the styling was only implemented with the expectation of use with the default button, and conflicts with other button states (e.g. unstyled buttons used as the submit buttons on some forms).
Screenshot: