From bc3b95b0aadb33696f45d2243251c61e8ec3d945 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 21 Nov 2022 15:21:17 -0800 Subject: [PATCH] add font foundations --- src/theme/foundations/fonts.ts | 7 +++++++ src/theme/foundations/index.ts | 1 + src/theme/foundations/textStyles.ts | 26 +++++++++++++------------- src/theme/index.ts | 3 ++- 4 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 src/theme/foundations/fonts.ts diff --git a/src/theme/foundations/fonts.ts b/src/theme/foundations/fonts.ts new file mode 100644 index 0000000000..0c2b4b0e89 --- /dev/null +++ b/src/theme/foundations/fonts.ts @@ -0,0 +1,7 @@ +export const fonts = { + // set base fonts as fallback + heading: '"JetBrains Mono", monospace', + button: '"JetBrains Mono", monospace', + code: '"JetBrains Mono", monospace', + body: '"Inter", sans-serif' +}; diff --git a/src/theme/foundations/index.ts b/src/theme/foundations/index.ts index fce166179d..43b9a6863c 100644 --- a/src/theme/foundations/index.ts +++ b/src/theme/foundations/index.ts @@ -1,5 +1,6 @@ export * from './colors'; export * from './config'; +export * from './fonts'; export * from './shadows'; export * from './sizes'; export * from './textStyles'; diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index 31ecc3f365..746b438436 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -1,6 +1,6 @@ export const textStyles = { h1: { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 700, fontSize: '2.75rem', lineHeight: '3.375rem', @@ -8,7 +8,7 @@ export const textStyles = { color: 'body' }, h2: { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 400, fontSize: '1.5rem', lineHeight: 'auto', @@ -16,36 +16,36 @@ export const textStyles = { color: 'body' }, 'header-font': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 700, fontSize: { base: '0.86rem', sm: '1rem' } }, 'homepage-description': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 700, lineHeight: '21px', letterSpacing: '0.05em', textAlign: { base: 'center', md: 'left' } }, 'homepage-primary-label': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', color: 'bg', fontWeight: 700, textTransform: 'uppercase' }, 'home-section-link-label': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 700, textTransform: 'uppercase', textAlign: 'center', p: 4 }, 'quick-link-text': { - fontFamily: '"Inter", sans-serif', + fontFamily: 'body', lineHeight: '26px' }, 'quick-link-label': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 700, textTransform: 'uppercase', textAlign: 'center', @@ -56,28 +56,28 @@ export const textStyles = { }, 'hero-text-small': { fontSize: '13px', - fontFamily: '"Inter", sans-serif' + fontFamily: 'body' }, 'footer-text': { - fontFamily: '"Inter", sans-serif', + fontFamily: 'body', lineHeight: '22px', fontWeight: 400, fontSize: '12px' }, 'downloads-button-label': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', color: 'bg', fontSize: { base: 'md', lg: 'xl' }, textTransform: 'uppercase' }, 'downloads-button-sublabel': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', color: 'bg', fontSize: { base: 'xs', lg: 'sm' }, textTransform: 'uppercase' }, 'download-tab-label': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 700, textTransform: 'uppercase', textAlign: 'center', diff --git a/src/theme/index.ts b/src/theme/index.ts index ff6c89914e..a9a91ae289 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -1,6 +1,6 @@ import { extendTheme } from '@chakra-ui/react'; -import { config, colors, shadows, sizes, textStyles } from './foundations'; +import { config, colors, fonts, shadows, sizes, textStyles } from './foundations'; import { Button, Link } from './components'; const overrides = { @@ -10,6 +10,7 @@ const overrides = { Button, Link }, + fonts, shadows, sizes, styles: {