Skip to content

Commit

Permalink
Use serif font in main texts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mystler committed Dec 7, 2024
1 parent 42f9234 commit 64602c6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ p {
@apply mb-4 last:mb-0;
}

article p,
article li {
@apply font-serif;
font-size: 20px;
}

article small {
@apply font-serif;
}

h1,
h2,
h3,
Expand Down
11 changes: 11 additions & 0 deletions src/lib/styles/garamond-font.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@font-face {
font-family: "EB Garamond";
font-style: normal;
src: url("/fonts/EBGaramond-VariableFont_wght.ttf");
}

@font-face {
font-family: "EB Garamond";
font-style: italic;
src: url("/fonts/EBGaramond-Italic-VariableFont_wght.ttf");
}
1 change: 1 addition & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import "@fortawesome/fontawesome-free/css/all.min.css";
import "$lib/styles/noto-font.css";
import "$lib/styles/garamond-font.css";
import "$lib/styles/base.css";
import Header from "$lib/components/Header.svelte";
import Sidebar from "$lib/components/Sidebar.svelte";
Expand Down
Binary file not shown.
Binary file added static/fonts/EBGaramond-VariableFont_wght.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {
extend: {},
fontFamily: {
sans: ["Noto Sans", "sans-serif"],
serif: ["EB Garamond", "serif"],
},
},
plugins: [],
Expand Down

0 comments on commit 64602c6

Please sign in to comment.