Visitar URL original
USWDS - File input: Use error token for error border by manichandra · Pull Request #6669 · uswds/uswds · GitHub
Skip to content

USWDS - File input: Use error token for error border - #6669

Merged
ethangardner merged 3 commits into
uswds:developfrom
manichandra:codex/uswds-5253-file-input-error-token
Jul 1, 2026
Merged

ethangardner merged 3 commits into
uswds:developfrom
manichandra:codex/uswds-5253-file-input-error-token

Conversation

@manichandra

Copy link
Copy Markdown
Contributor

Summary

Updated the file input error border to use the error color token, so projects that customize error and secondary colors separately receive the expected themed error styling.

Breaking change

This is not a breaking change.

Related issue

Closes #5253

Related pull requests

None.

Preview link

Preview link: N/A

Problem statement

The file input error state used secondary-dark for the .usa-form-group--error .usa-file-input__target border. Since secondary-dark and error-dark can be customized independently, projects with distinct secondary and error palettes could see file input error borders inherit the wrong semantic color.

Solution

Changed the file input error border token from secondary-dark to error-dark, matching the purpose of the error state and the token pattern used by other USWDS form components.

Major changes

  • Updated packages/usa-file-input/src/styles/_usa-file-input.scss to use color("error-dark") for the file input error border.

Testing and review

  • Ran npx prettier --check packages/usa-file-input/src/styles/_usa-file-input.scss
  • Ran npx stylelint packages/usa-file-input/src/styles/_usa-file-input.scss
  • Ran npx gulp compileSass
  • Ran npm run lint:sass
  • Ran git diff --check
  • Compiled a custom Sass snippet with different error-dark and secondary-dark theme colors and confirmed the error border follows error-dark

@ethangardner ethangardner moved this from Triage to Ready to Schedule in USWDS Core Project Data Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✅ All commits on this PR have a verified signature. Thanks!

@ethangardner ethangardner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks for the contribution.

@ethangardner
ethangardner merged commit f5ca4f6 into uswds:develop Jul 1, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Schedule to Fed Final Review in USWDS Core Project Data Jul 1, 2026
@ethangardner ethangardner moved this from Fed Final Review to Done in USWDS Core Project Data Jul 1, 2026
@manichandra
manichandra deleted the codex/uswds-5253-file-input-error-token branch July 10, 2026 01:02
@ethangardner ethangardner added this to the uswds 3.14.0 - Aug 2026 milestone Aug 4, 2026
@annepetersen annepetersen added the ❤️ Thanks Historical appreciation marker. Prefer a reaction; not required for triage. label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❤️ Thanks Historical appreciation marker. Prefer a reaction; not required for triage.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

USWDS - Bug: Incorrect Color Token used in File Input

3 participants