Add font preloading
This commit is contained in:
parent
fb074ed8b9
commit
43dd909d0c
4 changed files with 17 additions and 34 deletions
|
@ -9,7 +9,23 @@
|
|||
|
||||
<link rel="canonical" href="https://edgarpierre.fr/" />
|
||||
<link rel="icon" href="static/svg/logo.svg" />
|
||||
|
||||
<link rel="stylesheet" href="static/fonts/inter/inter.css" />
|
||||
<link rel="stylesheet" href="static/fonts/remix/remixicon.css" />
|
||||
<link rel="stylesheet" href="static/css/main.css" />
|
||||
|
||||
<link
|
||||
rel="preload"
|
||||
href="static/fonts/inter/Inter-roman.var.woff2?v=3.19"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin />
|
||||
<link
|
||||
rel="preload"
|
||||
href="static/fonts/remix/remixicon.woff2?t=1678097420828"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin />
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
@import "../fonts/inter/inter.css";
|
||||
@import "../fonts/remix/remixicon.css";
|
||||
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
font-style: inherit;
|
||||
|
@ -30,7 +27,7 @@
|
|||
}
|
||||
|
||||
body {
|
||||
font-family: "Inter var experimental", "Inter var", "Inter", sans-serif;
|
||||
font-family: "Inter var", "Inter", sans-serif;
|
||||
color: var(--text);
|
||||
margin: auto;
|
||||
margin-top: var(--navh);
|
||||
|
|
Binary file not shown.
|
@ -15,33 +15,3 @@ Usage:
|
|||
font-named-instance: 'Regular';
|
||||
src: url("Inter-roman.var.woff2?v=3.19") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter var';
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
font-style: italic;
|
||||
font-named-instance: 'Italic';
|
||||
src: url("Inter-italic.var.woff2?v=3.19") format("woff2");
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
[EXPERIMENTAL] Multi-axis, single variable font.
|
||||
|
||||
Slant axis is not yet widely supported (as of February 2019) and thus this
|
||||
multi-axis single variable font is opt-in rather than the default.
|
||||
|
||||
When using this, you will probably need to set font-variation-settings
|
||||
explicitly, e.g.
|
||||
|
||||
* { font-variation-settings: "slnt" 0deg }
|
||||
.italic { font-variation-settings: "slnt" 10deg }
|
||||
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'Inter var experimental';
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
font-style: oblique 0deg 10deg;
|
||||
src: url("Inter.var.woff2?v=3.19") format("woff2");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue