From d46784a4d57fbb08a3fe17f7b538b30d23553ad2 Mon Sep 17 00:00:00 2001 From: earlman Date: Sun, 4 Apr 2021 13:05:41 -0500 Subject: [PATCH] base font sizes on rem and var(--base) --- css/main.css | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/css/main.css b/css/main.css index 212fd04c..26de7bb8 100644 --- a/css/main.css +++ b/css/main.css @@ -1,6 +1,7 @@ :root { --color-text: #fff; --color-background: black; + --base: 20px; } html { @@ -8,6 +9,7 @@ html { overflow: hidden; background: var(--color-background); user-select: none; + font-size: var(--base); } ::-webkit-scrollbar { @@ -23,8 +25,7 @@ body { color: var(--color-text); font-family: "Roboto Condensed", sans-serif; font-weight: 400; - font-size: 2em; - line-height: 1.5em; + line-height: 1.5; -webkit-font-smoothing: antialiased; } @@ -48,27 +49,27 @@ body { } .xsmall { - font-size: 15px; + font-size: 0.667rem; line-height: 1.4; } .small { - font-size: 20px; + font-size: 1rem; line-height: 1.4; } .medium { - font-size: 30px; + font-size: 1.5rem; line-height: 1.4; } .large { - font-size: 65px; + font-size: 2.25rem; line-height: 1; } .xlarge { - font-size: 75px; + font-size: 3.375rem; line-height: 1; letter-spacing: -3px; }