From 3cb5780964cc0f3821847ad34c8e7330684854cd Mon Sep 17 00:00:00 2001 From: j285he Date: Mon, 12 Sep 2022 10:08:01 -0400 Subject: [PATCH] Standardize font sizes (#46) Closes #33. There were many more font sizes in the Figma, but as a best design practice, I chose the four most common. Staging: https://j285he-standardize-font-sizes-csc-class-prof-snedadah.k8s.csclub.cloud/ Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com> Co-authored-by: shahanneda Reviewed-on: https://git.csclub.uwaterloo.ca/www/cs-2022-class-profile/pulls/46 Reviewed-by: Amy --- pages/_app.css | 44 +++++++++++++++++++++++++++++++++++--------- pages/playground.tsx | 10 ++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/pages/_app.css b/pages/_app.css index 8c5d52f..70294e9 100644 --- a/pages/_app.css +++ b/pages/_app.css @@ -69,22 +69,52 @@ body { color: var(--primary-text); font-family: "Inconsolata", monospace; margin: 0; + + /* Font styling for body */ + font-size: calc(18rem / 16); + font-weight: 500; } -h1, +/* Page titles (e.g. Demographics) */ +h1 { + font-size: calc(48rem / 16); + font-weight: 700; + color: var(--primary-accent-light); + margin-top: calc(32rem / 16); + margin-bottom: calc(16rem / 16); +} + +/* Major section headings (e.g. About the Programs) */ h2 { + font-size: calc(36rem / 16); + font-weight: 700; color: var(--primary-heading); + margin-top: calc(32rem / 16); + margin-bottom: calc(16rem / 16); } +/* Minor section headings & questions (e.g. What Program Are You In?) */ h3 { + font-size: calc(32rem / 16); + font-weight: 700; color: var(--secondary-heading); - font-size: calc(45rem / 16); + margin-top: calc(24rem / 16); + margin-bottom: calc(16rem / 16); } -h4, -h5, -h6 { +/* Titles within paragraphs (e.g. About the Programs -> Computer Science)*/ +h4 { + font-size: calc(24rem / 16); + font-weight: 700; color: var(--secondary-heading); + margin-top: calc(24rem / 16); + margin-bottom: calc(8rem / 16); +} + +p { + color: var(--primary-text); + margin-top: 1rem; + margin-bottom: 1rem; } a { @@ -96,10 +126,6 @@ a:hover { color: var(--link-hover); } -p { - font-size: calc(28rem / 16); -} - @media only screen and (prefers-color-scheme: dark) { body { --primary-background: var(--dark--primary-background); diff --git a/pages/playground.tsx b/pages/playground.tsx index d7320bb..459f5f8 100644 --- a/pages/playground.tsx +++ b/pages/playground.tsx @@ -31,6 +31,16 @@ export default function Home() { +

+ Text Styles +

+

h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1

+

h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2

+

h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3

+

h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4

+

p p p p p p p p p p p p p p p p p p p p p p p p p p p p

+ a a a a a a a a a a a a a a a a a a a a a a a a a a a a +

{""}