Closed micahchiang closed 4 weeks ago
Hey team! Please add your planning poker estimate with Zenhub @Andrew565 @ataker @harshil1793 @it-harrison @jamigibbs @micahchiang @powellkerry @rmessina1010 @rsmithadhoc
I have a PR open with the USWDS core team to add a theme setting for including custom breakpoints to the utilities generator:
Description
vets-website has a
medium-screen
breakpoint with a value of 768px which is used extensively throughout the repo. Our utilities stylesheet has breakpoints which are, for the most part, direct swaps in terms of pixel values. USWDS doesn't have amedium-screen
breakpoint, the closest one beingtablet
which has a value of 640px. We added this earlier in the year and decided to keep the old 768px breakpoint as well.Because of its broad use, we need to add all responsive utility class names for
medium-screen:
to our utilities.css output. We get these for all other breakpoints for free from uswds, and the output looks like this:Considerations
slack convo with more context
One approach may be to adapt what Formation does by looping through a breakpoint map:
But instead of breakpoints, the map is comprised of key-value pairs for all utilities that require the
medium-screen
breakpoint, since that is the constant in this situation.Another approach could be to figure out how to modify the uswds system-properties tokens in our own stylesheet. This may save us a bunch of manual work, since then we'd theoretically be able to just add
"medium-screen": true
to our theme-utility-breakpoints mapThis is the list of all utilities the require the
medium-screen
breakpoint:Note: the above links also indicate what utilities for each property are needed. For example, the padding utility loop includes all of the class names appended to the responsive prefix:
vads-u-padding--, vads-u-padding-x--, vads-u-padding-y--, etc
. Our css library utilities generate these using uswds utility helpers.Tasks
medium-screen
to the list of responsive breakpoints that generates utility classes that are prefixed withmedium-screen\:
css-library/dist/utilities.css
is build with allmedium-screen\:
utilities based on the decided upon solutionAcceptance Criteria