Skip to content

Commit

Permalink
styles: Separate body and heading font tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
tillywoodfield committed May 14, 2024
1 parent b8ab6fb commit cb9144b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"scripts": {
"start": "storybook dev -p 6006",
"build": "sass --pkg-importer=node --no-source-map --style=expanded src/scss:dist/css ",
"build": "sass --pkg-importer=node --no-source-map --style=expanded src/scss:dist/css",
"build:storybook": "storybook build",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint",
Expand Down
3 changes: 2 additions & 1 deletion src/scss/tokens/_font.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
$font-stack-sans: "Avenir", Helvetica, Arial, sans-serif;
$font-stack-heading: "Avenir", Helvetica, Arial, sans-serif;
$font-stack-body: "Avenir", Helvetica, Arial, sans-serif;
$font-stack-monospace: monospace;
2 changes: 1 addition & 1 deletion src/scss/typography/_body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use "../tokens/spacing" as *;

html {
font-family: $font-stack-sans;
font-family: $font-stack-body;
color: $color-grey-90;
}

Expand Down
3 changes: 3 additions & 0 deletions src/scss/typography/_headings.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@use "../tokens/font" as *;

h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $font-stack-heading;
margin: 0.5em 0;
font-weight: bold;
}
Expand Down

0 comments on commit cb9144b

Please sign in to comment.