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

Introduce USWDS theming and upgrade to USWDS 3.8. #1425

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ To run tests (TBD -- this currently does not work with selenium web driver)
- copy the file ./pre-commit to your .git/hooks/ folder within the project to ensure changed files adhere to project standards, prior to commit.
- to get a commit through without running that pre-commit hook, use the --no-verify option

## Updating USWDS
Touchpoints employs a customized version of USWDS for styling. Upgrading to a new version of USWDS requires the following steps:
1. Run `yarn upgrade @uswds/uswds --latest --exact` to get the latest version of USWDS.
2. Run `npx gulp updateUswds` to update all of our project's assets to the new version of USWDS. This update includes
a step that generates CSS from the USWDS SASS files along with our project customizations. See [uswds-compiler documentation](https://designsystem.digital.gov/documentation/getting-started/developers/phase-two-compile/#introducing-uswds-compile-2)
for more details.

## License

See [LICENSE](LICENSE.md)
621 changes: 378 additions & 243 deletions app/assets/javascripts/uswds.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require uswds
Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed because I couldn't figure out a way to get the USWDS compiler to generate the file with its original name.

*= require uswds-styles
*= require site
*= require font-awesome-all
*= require jquery-ui
Expand Down
15 changes: 0 additions & 15 deletions app/assets/stylesheets/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -251,21 +251,6 @@ tbody tr:hover td {
text-decoration: none;
}

.usa-table {
Copy link
Member Author

Choose a reason for hiding this comment

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

These overrides were replaced by setting $theme-table-border-color in uswds/_uswds-theme.scss.

th, td {
border: 1px solid #f0f0f0;
}
td:first-child {
border-left: 1px solid #f0f0f0;
}
td:last-child {
border-right: 1px solid #f0f0f0;
}
tbody tr:last-child {
border-bottom: 1px solid #f0f0f0;
}
}

// Override
.usa-nav__secondary {
bottom: 1.5rem;
Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/uswds-styles.css
Copy link
Member Author

Choose a reason for hiding this comment

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

I wish this was not minified but that's how the USWDS compiler operates. There is a feature request in uswds-compile asking to make minification optional. Admittedly, that is a very old feature request and the project hasn't had a release for a long time but I could ask about it.

Large diffs are not rendered by default.

Loading
Loading