Skip to content

Commit

Permalink
Added support for fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
yatish27 committed Apr 19, 2024
1 parent 23ef557 commit 0ca0982
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 1 deletion.
Binary file added app/frontend/fonts/dm_sans/DMSansItalicVF.ttf
Binary file not shown.
Binary file added app/frontend/fonts/dm_sans/DMSansVF.ttf
Binary file not shown.
Binary file added app/frontend/fonts/fira_code/FiraCodeVF.ttf
Binary file not shown.
Binary file added app/frontend/fonts/geist/GeistVariableVF.ttf
Binary file not shown.
30 changes: 30 additions & 0 deletions app/frontend/stylesheets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,33 @@
- Default foreground, background, and link colors.
- Global CSS variables (declared on :root), such as color palette.
*/

@font-face {
font-family: "Geist";
src: url("@assets/fonts/geist/GeistVariableVF.ttf") format("truetype");
font-weight: 100 900;
font-style: normal;
}

@font-face {
font-family: "DMSans";
src: url("@assets/fonts/dm_sans/DMSansVF.ttf") format("truetype");
font-weight: 100 900;
font-style: normal;
}


@font-face {
font-family: "FiraCode";
src: url("@assets/fonts/fira_code/FiraCodeVF.ttf") format("truetype");
font-weight: 100 900;
font-style: normal;
}


@layer base {
:root {
--font-sans: DMSans;
--font-mono: FiraCode;
}
}
8 changes: 7 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @type {import('tailwindcss').Config} */
const defaultTheme = require("tailwindcss/defaultTheme");

export default {
darkMode: ["class"],
Expand All @@ -12,7 +13,12 @@ export default {
"./app/frontend/**/*.js",
],
theme: {
extend: {},
extend: {
fontFamily: {
sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans],
mono: ["var(--font-mono)", ...defaultTheme.fontFamily.mono],
},
},
},
plugins: [],
};

0 comments on commit 0ca0982

Please sign in to comment.