Rename font size custom properties

This commit is contained in:
Helen Chong 2024-06-10 18:17:01 +08:00
parent 2ea3f59bec
commit af13363443
2 changed files with 11 additions and 10 deletions

View File

@ -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 {

View File

@ -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);
}