Skip to content

Match usa-input-error selector to USWDS#275

Merged
aduth merged 3 commits intomainfrom
aduth-unqualify-error-input
Nov 23, 2021
Merged

Match usa-input-error selector to USWDS#275
aduth merged 3 commits intomainfrom
aduth-unqualify-error-input

Conversation

@aduth
Copy link
Contributor

@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