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

Fix active, disabled, unstyled button background color (again) #5025

Merged
merged 1 commit into from May 4, 2021

Conversation

aduth
Copy link
Member

@aduth aduth commented May 4, 2021

This restores the fix from #4881, which was prematurely removed in #5014, as it had not been ported upstream to identity-style-guide. This is fixed in USWDS v2.11.2 (uswds/uswds#4077), so a future USWDS version sync in identity-style-guide will resolve it and allow us to remove it from the IdP.

Why: When an unstyled button is used as the submit button in a form, it can cause an issue where clicking the button would make it both disabled and active. This is because our default form validation will disable all submit buttons when a form is submitted. Since this happens at the same time as the link activation, and since the USWDS default disabled button styles conflict with the unstyled link appearance, an undesirable background color can be shown.

Screenshot:

Before After
Screen Shot 2021-05-04 at 8 52 29 AM Screen Shot 2021-05-04 at 8 53 27 AM

* Fix active, disabled, unstyled button background color

**Why**: When an unstyled button is used as the submit button in a form, it can cause an issue where clicking the button would make it both disabled and active. This is because our default form validation will disable all submit buttons when a form is submitted. Since this happens at the same time as the link activation, and since the USWDS default disabled button styles conflict with the unstyled link appearance, an undesirable background color can be shown.

* Match full selector chain from disabled styles
@aduth aduth merged commit b2d6747 into main May 4, 2021
@aduth aduth deleted the aduth-fix-active-disabled-unstyled-button-again branch May 4, 2021 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants