Skip to content

Commit

Permalink
refactor: move font sizes to root
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Dec 16, 2024
1 parent 4ab541f commit ccdd559
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
html {
font-size: var(--size-font-16-20);
}

body {
color: var(--color-font-primary);
font-size: var(--size-font-16-20);
font-family: var(--font-stack-base);
line-height: var(--size-leading-base);
}
Expand Down
6 changes: 4 additions & 2 deletions packages/epo-react-lib/src/styles/globalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ const createCSSGlobalSizes = () => {

const GlobalStyles = createGlobalStyle<{ includeFonts?: boolean }>`
${({ includeFonts = true }) => (includeFonts ? baseFont : "")}
body {
font-family: var(--FONT_STACK_BASE);
html {
font-size: ${calculateClamp({
minSize: parseInt(FONT_SIZE_BASE_MOBILE),
maxSize: parseInt(FONT_SIZE_BASE_DESKTOP),
minWidth: 320,
maxWidth: 1240,
})};
}
body {
font-family: var(--FONT_STACK_BASE);
line-height: var(--LINE_HEIGHT_BASE);
}
:root {
Expand Down

0 comments on commit ccdd559

Please sign in to comment.