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

Match usa-input-error selector to USWDS #275

Merged
merged 3 commits into from
Nov 23, 2021
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Nov 22, 2021

Why: The error input style selector in USWDS does not qualify as one of .usa-input, .usa-textarea, or .usa-select. In many cases, this makes little difference since the modifier would be applied to an element with one of those classes. However, this is not strictly required, and causes some challenge in the IdP with SimpleForm compatibility, where design system classes are not yet being applied (pending LG-3877). Furthermore, per updated guidance in #271, selectors with overriding styles should seek to precisely match the USWDS selector it is overriding.

Future work should seek to bring stylesheet files into closer alignment with USWDS files where these styles are defined (tracked in LG-5398). This would include moving styles from src/scss/components/_inputs.scss to src/scss/elements/form-controls/_text-input.scss.

Screenshots:

Before After
Screen Shot 2021-11-22 at 9 29 37 AM Screen Shot 2021-11-22 at 9 29 43 AM

**Why**: The error input selector in USWDS does not qualify as one of `.usa-input`, `.usa-textarea`, or `.usa-select`. In many cases, this makes little difference since the modifier would be applied to an element with one of those classes. However, this is not strictly required, and causes some challenge in the IdP with SimpleForm compatibility. Furthermore, per updated guidance in #271, selectors with overriding styles should seek to precisely match the USWDS selector it is overriding.

Future work should seek to bring stylesheet files into closer alignment with USWDS files where these styles are defined (tracked in LG-5398).
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aduth aduth merged commit d1a3f83 into main Nov 23, 2021
@aduth aduth deleted the aduth-unqualify-error-input branch November 23, 2021 12:57
@aduth aduth mentioned this pull request Jan 25, 2022
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.

2 participants