Skip to content

Commit

Permalink
Improve font loading performance (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
germanfrelo committed Mar 5, 2023
1 parent 8d7dd98 commit e63c45d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 13 additions & 5 deletions src/_includes/layouts/base.html
Expand Up @@ -2,11 +2,19 @@
<html lang="es-ES" class="no-js" data-theme="system">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
{%- if title -%}{{ title }} | {{ site.title }}{%- else -%}{{ site.title
}}{%- endif -%}
</title>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
/>
<link
rel="stylesheet"
href="https://germanfrelo.github.io/base-css-stylesheet/base.css"
Expand Down
12 changes: 2 additions & 10 deletions src/assets/css/my-css-styles.css
@@ -1,6 +1,5 @@
/*
STRUCTURE:
0. At-rules
1. Global custom properties
2. Global and inherited styles
3. Composition / Layout primitives
Expand All @@ -9,21 +8,14 @@
6. Exceptions
*/

/* ============ 0. AT-RULES ============ */

@import "https://cdn.jsdelivr.net/npm/@xz/fonts@1/serve/inter.min.css";

/* ============ 1. GLOBAL CUSTOM PROPERTIES ============ */

:root {
--color-scheme: light dark;

/* Font Family */
--ff-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
"Roboto", "Helvetica", "Arial", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji";
--ff-mono: ui-monospace, "SFMono-Regular", "Consolas", "Liberation Mono",
"Menlo", monospace;
--ff-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
--ff-mono: ui-monospace, "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace;

/* Font Weight */
--fw-700: 700;
Expand Down

0 comments on commit e63c45d

Please sign in to comment.