Score:1

How can I customize breakpoints in USWDS base theme?

cz flag

I'm using the USWDS_base theme as a base for my custom theme. Version 8.x-2.10

In this file: web/themes/custom/my_child_theme/sass/_uswds-theme-utilities.scss I find the tokens used for the breakpoints (see screenshot).

In the comments, I can see what size those tokens represent. I can't find anywhere where those numbers are set so that I can override them. I've been combing through the theme for hours. Can anyone point me in the right direction?

Edit:

I found this file, where the calculations are being made.

web/themes/custom/my_child_theme/node_modules/uswds/dist/scss/core/_system-tokens.scss

I've brought the specific variables affecting breakpoints out of node_modules and into my custom styles .scss file, but the calculation values I changed don't seem to affect the tokens.

I feel like I'm so close...

Breakpoints

No Sssweat avatar
ua flag
Doing a `grep -r "1200px"` [easily showed](https://i.stack.imgur.com/VOR3L.png) me all the files `1200px` appears in. It's declared in the **_data/tokens/spacing.yml** file.
LeraA avatar
cz flag
Unfortunately, searching for 1200 doesn't help here. It's more complex than grepping. This theme does not contain a data or tokens folder and spacing.yml doesn't exist. In fact, the tokens are set via a calculation in the file I mention in my question. I'm very grateful you posted this comment, though. It's the first anyone has had to say about hiere. Thanks! I've been consulting with some colleagues who also ran into the same problem and they gave up eventually. The couldn't find a way to change the token value and resorted to hard-coding a value.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.