From af13363443b8e0d3701184f2d3192dc3df5179e5 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:17:01 +0800 Subject: [PATCH] Rename font size custom properties --- src/assets/css/general.css | 10 +++++----- src/assets/css/global.css | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/assets/css/general.css b/src/assets/css/general.css index 23f465a3..175a4bf0 100644 --- a/src/assets/css/general.css +++ b/src/assets/css/general.css @@ -15,12 +15,12 @@ body { main { width: 100%; display: grid; - font-size: var(--sz-main-txt); + font-size: var(--fs-main); } h1 { color: var(--clr-main-heading); - font-size: var(--sz-h1); + font-size: var(--fs-h1); border-bottom: 0.18rem solid var(--clr-title-border); padding-bottom: 0.3em; margin-bottom: 0.5em; @@ -35,11 +35,11 @@ h1, h2, h3 { } h2, .h2 { - font-size: var(--sz-h2); + font-size: var(--fs-h2); } h3, .h3 { - font-size: var(--sz-h3); + font-size: var(--fs-h3); } h2:has(+ *[class]:not(.heading-anchor)), .h2:has(+ *[class]), @@ -48,7 +48,7 @@ h3:has(+ *[class]:not(.heading-anchor)), .h3:has(+ *[class]) { } h4, .h4 { - font-size: var(--sz-h4); + font-size: var(--fs-h4); } strong { diff --git a/src/assets/css/global.css b/src/assets/css/global.css index 641f3d87..2d75039b 100644 --- a/src/assets/css/global.css +++ b/src/assets/css/global.css @@ -38,11 +38,12 @@ --ff-primary: 'Lexend'; --ff-monospace: 'Inter One Mono'; - --sz-main-txt: 1.2rem; - --sz-h1: clamp(2rem, 1rem + 5vw, 3rem); - --sz-h2: clamp(1.55rem, 1rem + 3vw, 2.15rem); - --sz-h3: clamp(1.55rem, 1rem + 3vw, 1.8rem); - --sz-h4: clamp(1.4rem, 1rem + 3vw, 1.6rem); + --fs-main: 1.2rem; + --fs-h1: clamp(2rem, 1rem + 5vw, 3rem); + --fs-h2: clamp(1.55rem, 1rem + 3vw, 2.15rem); + --fs-h3: clamp(1.55rem, 1rem + 3vw, 1.8rem); + --fs-h4: clamp(1.4rem, 1rem + 3vw, 1.6rem); + --sz-paragraph-margin: 1.15em; --sz-main-padding: clamp(1rem, 5%, 4rem); }