Skip to content

Commit

Permalink
Install variable font with fontsource
Browse files Browse the repository at this point in the history
  • Loading branch information
tomodwyer committed Sep 6, 2024
1 parent c722892 commit c7b2288
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/src/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import "vite/modulepreload-polyfill";
import "@fontsource-variable/public-sans";
import "../styles/main.css";
9 changes: 9 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
"postcss": "^8.4.40",
"tailwindcss": "^3.4.7",
"vite": "^5.3.5"
},
"dependencies": {
"@fontsource-variable/public-sans": "^5.0.19"
}
}
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
theme: {
extend: {
fontFamily: {
sans: ["Public Sans", ...fontFamily.sans],
sans: ["Public Sans Variable", ...fontFamily.sans],
},
colors: {
oxford: {
Expand Down
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ export default defineConfig({
},
},
},
server: {
origin: "http://localhost:5173",
},
});

0 comments on commit c7b2288

Please sign in to comment.