Skip to content

Utilize $theme-font-weight-bold variable for customizing bold font-weight #3811

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

Merged

Conversation

sawyerh
Copy link
Contributor

@sawyerh sawyerh commented Nov 5, 2020

Description

This addresses an issue where sites could not theme the weight value for "bold" using $theme-font-weight-bold.

"bold" maps to 700. This is an issue if a site is using a custom font that is not part of the USWDS and has a non-standard weight value (like 550).

Additional information

This was discovered why working a site that pretty heavily themes USWDS since it's a state govt website with their own unique branding. They utilize a variable font and "bold" is closer to 550.

In my Sass, I've set $theme-global-content-styles: true and $theme-font-weight-bold: 550 however all of the headings still output font-weight: bold. I would expect them to output font-weight: 550 instead. This change should enable that.

image

  • Follow the 18F Front End Coding Style Guide and Accessibility Guide.
  • Run npm test and make sure the tests for the files you have changed have passed.
  • Run your code through HTML_CodeSniffer and make sure it’s error free.
  • Title your pull request using this format: [Website] - [UI component]: Brief statement describing what this pull request solves.

@sawyerh sawyerh changed the title Utilize theme variable for bold font-weight Utilize $theme-font-weight-bold variable for customizing bold font-weight Nov 5, 2020
@sawyerh
Copy link
Contributor Author

sawyerh commented Nov 16, 2020

@mejiaj Just confirming, no further action needed on my end for this? Couldn't tell why the federalist/build step wasn't running.

@mejiaj
Copy link
Contributor

mejiaj commented Nov 20, 2020

@sawyerh no, you shouldn't have to do anything on your part. Just needs final review and pulled into a branch from @uswds/core to get the build working.

@thisisdano thisisdano merged commit 6f45ee1 into uswds:develop Dec 8, 2020
@sawyerh sawyerh deleted the sawyerh/themeable-bold-font-weight branch December 12, 2020 19:40
@thisisdano thisisdano mentioned this pull request Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants