From b07770858529dcf019c2964d43ef11d4d9b5195a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 11 Sep 2024 11:01:35 +0800 Subject: [PATCH] feat: Add Typekit font loading script --- index.html | 30 ++++++++++++++++++++++++++++++ src/assets/base.css | 24 +++++++++++------------- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index ec5b127..0debae1 100644 --- a/index.html +++ b/index.html @@ -20,4 +20,34 @@ + diff --git a/src/assets/base.css b/src/assets/base.css index 8816868..7cd4f0e 100644 --- a/src/assets/base.css +++ b/src/assets/base.css @@ -58,6 +58,14 @@ font-weight: normal; } +:root { + --h-base-font: lxgw-wenkai-mono-tc, alibaba-puhuiti, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; +} +:root:root { + --van-base-font: var(--h-base-font); +} + body { min-height: 100vh; color: var(--color-text); @@ -66,19 +74,9 @@ body { color 0.5s, background-color 0.5s; line-height: 1.6; - font-family: - Inter, - -apple-system, - BlinkMacSystemFont, - 'Segoe UI', - Roboto, - Oxygen, - Ubuntu, - Cantarell, - 'Fira Sans', - 'Droid Sans', - 'Helvetica Neue', - sans-serif; + font-family: var(--h-base-font); + font-weight: 400; + font-style: normal; font-size: 15px; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;