USWDS - Header: Add navigation link color setting#6662
Open
manichandra wants to merge 2 commits into
Open
Conversation
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.
Summary
Added configurable color settings for header navigation links. Header nav links now use theme settings for their default and hover colors, allowing teams to customize navigation color without custom CSS overrides.
Breaking change
This is not a breaking change.
Related issue
Closes #6176
Related pull requests
A follow-up uswds-site PR may be needed to document the new
$theme-navigation-link-colorand$theme-navigation-link-hover-colorsettings.Preview link
Preview link: N/A
Problem statement
Header navigation link color was hard-coded to
base-dark, and hover color was hard-coded toprimary. Teams that needed different navigation colors had to override USWDS CSS in their projects.Solution
Added
$theme-navigation-link-colorand$theme-navigation-link-hover-colorcomponent settings. The new settings default to the existing colors, so the default compiled appearance remains unchanged while allowing teams to configure both states.Major changes
$theme-navigation-link-color.$theme-navigation-link-hover-color.Testing and review
npx prettier --check packages/uswds-core/src/styles/settings/_settings-components.scss packages/usa-nav/src/styles/_usa-nav.scssnpx stylelint packages/uswds-core/src/styles/settings/_settings-components.scss packages/usa-nav/src/styles/_usa-nav.scssnpx gulp compileSassnpm run lint:sassgit diff --check