Skip to content

Commit

Permalink
feat: custom fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartek532 committed Nov 2, 2024
1 parent ceb2128 commit b221133
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"yoavbls.pretty-ts-errors",
"bradlc.vscode-tailwindcss",
"biomejs.biome"
]
}
Binary file added assets/fonts/Geist-Bold.woff2
Binary file not shown.
Binary file added assets/fonts/Geist-Regular.woff2
Binary file not shown.
Binary file added assets/fonts/GeistMono-Bold.woff2
Binary file not shown.
Binary file added assets/fonts/GeistMono-Regular.woff2
Binary file not shown.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions src/components/common/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const Main = ({ className, filename }: MainProps) => {
</p>
<a
href="https://turbostarter.dev/docs/extension"
target="_blank"
rel="noreferrer"
className="cursor-pointer text-sm text-primary underline hover:no-underline"
>
{chrome.i18n.getMessage("learnMore")}
Expand Down
37 changes: 37 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

@layer base {
:root {
--font-sans: "Geist", sans-serif;
--font-mono: "Geist Mono", monospace;

--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
Expand Down Expand Up @@ -68,3 +71,37 @@
font-feature-settings: "rlig" 1, "calt" 1;
}
}

@layer base {
@font-face {
font-family: "Geist";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/assets/fonts/Geist-Regular.woff2) format("woff2");
}

@font-face {
font-family: "Geist";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(/assets/fonts/Geist-Bold.woff2) format("woff2");
}

@font-face {
font-family: "Geist Mono";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/assets/fonts/GeistMono-Regular.woff2) format("woff2");
}

@font-face {
font-family: "Geist Mono";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(/assets/fonts/GeistMono-Bold.woff2) format("woff2");
}
}
1 change: 1 addition & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default {
},
fontFamily: {
sans: ["var(--font-sans)", ...fontFamily.sans],
mono: ["var(--font-mono)", ...fontFamily.mono],
},
keyframes: {
"accordion-down": {
Expand Down

0 comments on commit b221133

Please sign in to comment.