Skip to content

Commit

Permalink
configure font file and family on css
Browse files Browse the repository at this point in the history
  • Loading branch information
nahbee10 committed Oct 30, 2024
1 parent ae5091a commit d96f6bc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
44 changes: 22 additions & 22 deletions assets/types.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ const config: Config = {
lg: `${SCREEN_SIZE.XL_DESKTOP.min}px`,
},
extend: {
fontFamily: {
'basel-grotesk': ['var(--font-basel-grotesk)'],
riegraf: ['var(--font-riegraf)'],
'fragment-mono': ['var(--font-fragment-mono)'],
},
borderRadius: {
large: rem(20),
medium: rem(16),
Expand Down
11 changes: 7 additions & 4 deletions templates/document_head.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
}
</script>
<style>
/* Define Riegraf font */
:root {
--font-riegraf: 'Riegraf', serif;
--font-basel-grotesk: 'Basel Grotesk', sans-serif;
--font-fragment-mono: 'Fragment Mono', monospace;
}
@font-face {
font-family: 'Riegraf';
src: url("{{asset 'Riegraf-Regular.woff2'}}") format('woff2'),
Expand Down Expand Up @@ -111,11 +116,9 @@
font-style: normal;
}
/* Define Fragment Mono font */
@font-face {
font-family: 'Fragment Mono';
src: url('{{asset "fragment-mono-regular.woff2"}}') format('woff2'),
url('{{asset "fragment-mono-regular.woff"}}') format('woff');
src: url('https://fonts.googleapis.com/css2?family=Fragment+Mono:ital@0;1&display=swap');
font-weight: 400;
font-style: normal;
}
Expand Down

0 comments on commit d96f6bc

Please sign in to comment.