-
Notifications
You must be signed in to change notification settings - Fork 12
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
CSS Library: add USWDS theme setting for medium-screen breakpoint utilities #1379
Conversation
This reverts commit 13dc62a.
---------------------------------------- | ||
*/ | ||
/* | ||
---------------------------------------- | ||
rem-to-user-em() | ||
px-to-user-em() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USWDS added a new Sass function in this update and comments for it are getting output in a bunch of stylesheets. Functionally those stylesheets have not changed though.
@@ -22,7 +22,6 @@ | |||
"prism": "^1.27.0" | |||
}, | |||
"dependencies": { | |||
"@department-of-veterans-affairs/css-library": "^0.11.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this was needed here. We don't run yarn build
in the repo's root folder as part of our development build steps. We run it in web-components
, core
, react-components
, and storybook
.
As far as I can tell, css-library is just needed in the web-components package.json so I'm going to clean this up to avoid confusion (it's me, I was the confused one 🙋🏼♀️).
} | ||
} | ||
@media all and (min-width: 48em) { | ||
.medium-screen\:vads-grid-container-card { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have observed that there are less utilities getting generated now than what we had before when we were using our custom breakpoint code.
The reason I think this is happening is because the custom code did not take into account the utility settings that identified the ones that we didn't want to be generated with responsive breakpoints. For example, text-decoration utilities has responsive: false
:
component-library/packages/css-library/src/utilities/settings.scss
Lines 136 to 143 in a001910
$text-decoration-settings: ( | |
output: true, | |
responsive: false, | |
active: false, | |
focus: false, | |
hover: false, | |
visited: false, | |
) !default; |
Now that it's respecting those settings, we should expect to see less of them generated (smaller build! yay!)
@@ -39,6 +38,7 @@ | |||
"devDependencies": { | |||
"@axe-core/puppeteer": "^4.10.0", | |||
"@babel/core": "^7.12.13", | |||
"@department-of-veterans-affairs/css-library": "^0.13.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was originally in the dependencies
list but I think because this repo is set up using workspaces, I could not update the USWDS package in the css-library without also needing it done in the web-components packages. Moving it to devDependencies
fixed the build issue I was having.
We have a separate ticket for updating USWDS in other packages.
Chromatic
https://3400-uwsds-utility-breakpoint--65a6e2ed2314f7b8f98609d8.chromatic.com
Description
With the
$theme-utility-breakpoints-custom
setting now available in the latest USWDS release, we can replace our custom Sass code with it. This PR:Closes department-of-veterans-affairs/vets-design-system-documentation#3400
QA Checklist
Screenshots
Acceptance criteria
Definition of done