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

Cap heights for the theme typeface in USWDS #1157

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
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
64 changes: 63 additions & 1 deletion app/scripts/styles/_uswds-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,74 @@
"display-name": var(--base-font-family),
"cap-height": 364px,
),
"system": (
"cap-height": 364px
),
"merriweather": (
display-name: "Merriweather Web",
cap-height: 364px,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't find a way to only set the cap-height without adding the rest of the values for the typeface, copied from the uswds config defaults.

stack: 'font-stack-georgia',
src: (
dir: "merriweather",
roman: (
100: false,
200: false,
300: "Latin-Merriweather-Light",
400: "Latin-Merriweather-Regular",
500: false,
600: false,
700: "Latin-Merriweather-Bold",
800: false,
900: "Latin-Merriweather-Black",
),
italic: (
100: false,
200: false,
300: "Latin-Merriweather-LightItalic",
400: "Latin-Merriweather-Italic",
500: false,
600: false,
700: "Latin-Merriweather-BoldItalic",
800: false,
900: "Latin-Merriweather-BlackItalic",
),
),
),
"roboto-mono": (
display-name: "Roboto Mono Web",
cap-height: 364px,
stack: 'font-stack-monospace',
src: (
dir: "roboto-mono",
roman: (
100: "roboto-mono-v5-latin-100",
200: false,
300: "roboto-mono-v5-latin-300",
400: "roboto-mono-v5-latin-regular",
500: "roboto-mono-v5-latin-500",
600: false,
700: "roboto-mono-v5-latin-700",
800: false,
900: false,
),
italic: (
100: "roboto-mono-v5-latin-100italic",
200: false,
300: "roboto-mono-v5-latin-300italic",
400: "roboto-mono-v5-latin-italic",
500: "roboto-mono-v5-latin-500italic",
600: false,
700: "roboto-mono-v5-latin-700italic",
800: false,
900: false,
),
),
),
),
$theme-type-scale-md: 8,
$theme-utility-breakpoints: (
"mobile-lg": false,
"desktop": false
),
$theme-font-type-sans: baseFontFamily,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@faustoperez I mapped sans to the base font family (e.g "Inter" in GHG Center's case). Could be adjusted as we need it.

$theme-font-type-serif: baseFontFamily,
);
Loading