Skip to content

Commit

Permalink
chore: move google fonts to a build-time import
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Jan 23, 2022
1 parent 22cc684 commit 067b0a8
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"husky": "^7.0.4",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.5",
"postcss-import-url": "^7.0.0",
"postcss-load-config": "^3.1.1",
"postcss-preset-env": "^7.2.3",
"prettier": "~2.5.1",
Expand Down
55 changes: 55 additions & 0 deletions pnpm-lock.yaml

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

4 changes: 4 additions & 0 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const tailwindCSS = require('tailwindcss');
const tailwindCSSNesting = require('tailwindcss/nesting');
// ^ Just for now, will merge to tailwindcss. Check https://blog.tailwindcss.com/just-in-time-the-next-generation-of-tailwind-css
const autoprefixer = require('autoprefixer');
const importUrl = require('postcss-import-url');

module.exports = {
plugins: [
Expand All @@ -13,6 +14,9 @@ module.exports = {
}
}),

importUrl({
modernBrowser: true
}),
tailwindCSSNesting(),
tailwindCSS(),
autoprefixer,
Expand Down
5 changes: 0 additions & 5 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible&family=Roboto&family=Roboto+Mono&family=Material+Icons&display=swap"
rel="stylesheet"
/>

%svelte.head%
</head>
Expand Down
2 changes: 2 additions & 0 deletions src/routes/_global.postcss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@import '../../node_modules/prismjs/themes/prism-okaidia.css';
@import '../../node_modules/cookieconsent/build/cookieconsent.min.css';

@import 'https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible&family=Roboto&family=Roboto+Mono&family=Material+Icons&display=swap';

@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down

0 comments on commit 067b0a8

Please sign in to comment.