font styles and load speed

This commit is contained in:
Joshua Seigler 2025-06-19 22:28:00 -04:00
parent ca1719600d
commit 4cd8d22238
10 changed files with 27 additions and 23 deletions

View file

@ -1,14 +0,0 @@
@font-face {
font-family: Inter;
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("/fonts/inter/InterVariable.woff2") format("woff2");
}
@font-face {
font-family: Inter;
font-style: italic;
font-weight: 100 900;
font-display: swap;
src: url("/fonts/inter/InterVariable-Italic.woff2") format("woff2");
}

View file

@ -0,0 +1,17 @@
/* inter-latin-wght-normal */
@font-face {
font-family: 'Inter Variable';
font-style: italic;
font-display: swap;
font-weight: 100 900;
src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* inter-latin-wght-italic */
@font-face {
font-family: 'Inter Variable';
font-style: italic;
font-display: swap;
font-weight: 100 900;
src: url(/fonts/inter-latin-wght-italic.woff2) format('woff2-variations');
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

View file

@ -52,8 +52,8 @@ body {
padding: 0;
margin: 0;
font-family:
Inter, Ubuntu, "Noto Sans", "Fira Sans", Roboto, "Helvetica Neue",
"Arial Nova", "Nimbus Sans", Arial, sans-serif;
"Inter", "Inter Variable", Ubuntu, "Noto Sans", "Fira Sans", Roboto,
"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif;
background-color: var(--c-body-background);
color: var(--c-text-dark);
background-image:
@ -157,7 +157,7 @@ main p img {
max-width: 100%;
}
section:nth-child(n+2) {
section:nth-child(n + 2) {
margin-top: 1rem;
}
@ -173,8 +173,8 @@ header.toc {
li {
display: inline;
list-style: none;
&:nth-child(n+2):before {
content: ' · ';
&:nth-child(n + 2):before {
content: " · ";
}
}
}
@ -271,7 +271,8 @@ span.aside {
}
}
ul, ol {
ul,
ol {
padding-left: 1.5rem;
}
@ -478,7 +479,7 @@ h4 {
font-weight: 700;
text-shadow: 0 0 0.5em var(--c-highlight);
margin-top: 0;
main > &:nth-child(n+2) {
main > &:nth-child(n + 2) {
margin-top: 1.5rem;
}
margin-bottom: 0.5rem;