From 4710fb1c87d5926f630716f003e736e019b3fcf5 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 14 Dec 2023 21:28:31 +0000 Subject: Eiks 31 (#41) * Eiks 31 * Prettier dl's * Prettier headings --------- Co-authored-by: Joe Carstairs --- scss/base/dl.scss | 5 +++++ scss/base/index.scss | 6 +++--- scss/base/typography.scss | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 scss/base/dl.scss (limited to 'scss/base') diff --git a/scss/base/dl.scss b/scss/base/dl.scss new file mode 100644 index 0000000..95cc836 --- /dev/null +++ b/scss/base/dl.scss @@ -0,0 +1,5 @@ +dt { + font-weight: 700; + text-decoration: underline; + margin-top: 1rem; +} \ No newline at end of file diff --git a/scss/base/index.scss b/scss/base/index.scss index da4f59e..f338772 100644 --- a/scss/base/index.scss +++ b/scss/base/index.scss @@ -1,4 +1,4 @@ -@use 'typography'; -@use 'theme'; +@use 'dl'; @use 'list'; - +@use 'theme'; +@use 'typography'; diff --git a/scss/base/typography.scss b/scss/base/typography.scss index fb2ac17..b9936ec 100644 --- a/scss/base/typography.scss +++ b/scss/base/typography.scss @@ -45,6 +45,8 @@ h3, h4 { font-family: var(--font-serif); font-weight: 700; + line-height: 1.15; + text-wrap: balance; } .title { @@ -52,6 +54,7 @@ h4 { font-size: var(--font-size-6); font-weight: 700; margin-block-start: var(--margin-block-sm); + text-wrap: balance; } .title--small { -- cgit v1.2.3 From 91e3b90179ca4b75dbbb1c06c8188dca0bdecf67 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 16 Dec 2023 11:49:48 +0000 Subject: Eiks 31 fixes (#43) * Eiks 31 fixes * Improves list styling --- scss/base/typography.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scss/base') diff --git a/scss/base/typography.scss b/scss/base/typography.scss index b9936ec..9f40bcc 100644 --- a/scss/base/typography.scss +++ b/scss/base/typography.scss @@ -62,7 +62,7 @@ h4 { margin-block-start: 0; } -p:not(:first-child) { +:is(p, ol, ul):not(:first-child) { margin-block-start: var(--margin-block-sm); } -- cgit v1.2.3 From 0b2fbe3f5b9e2fcf0da2b320af504d5cca759045 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <118172583+jcarstairs-scottlogic@users.noreply.github.com> Date: Fri, 19 Jan 2024 07:32:30 +0000 Subject: Layout and typography improvements (#63) * Adds soft hyphens to homepage * auto-hyphenates! * Tighter line-height in logo * Fixes spacing and typography below xs breakpoint * Fixes xs-sm spacing and typography * Fixes border widths * Link hover uses wavy underline instead of fat underline * Fixes committee img layout on scss/custom-properties * Pulls out colours SCSS variables * Merges margins and padding values * Moves variables/colours -> values/colours * Starts migrating spacing values to SCSS * Pulls out typography logic to SCSS variables/functions * Removes unneeded --er custom property * Calculates grid-total-width-absolute in SCSS * Forwards constants with @forward * Removes TODOs and unnecessary assignment to --width-prose --- scss/base/typography.scss | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'scss/base') diff --git a/scss/base/typography.scss b/scss/base/typography.scss index 9f40bcc..4dd0afb 100644 --- a/scss/base/typography.scss +++ b/scss/base/typography.scss @@ -5,6 +5,7 @@ body { letter-spacing: 0.03rem; line-height: 1.5; word-wrap: break-word; + hyphens: auto; } h1 { @@ -12,7 +13,7 @@ h1 { } h1:not(:first-child) { - margin-block-start: var(--margin-block-lg); + margin-block-start: var(--spacing-block-lg); } h2 { @@ -20,7 +21,7 @@ h2 { } h2:not(:first-child) { - margin-block-start: var(--margin-block-lg); + margin-block-start: var(--spacing-block-lg); } h3 { @@ -28,7 +29,7 @@ h3 { } h3:not(:first-child) { - margin-block-start: var(--margin-block-md); + margin-block-start: var(--spacing-block-md); } h4 { @@ -36,7 +37,7 @@ h4 { } h4:not(:first-child) { - margin-block-start: var(--margin-block-sm); + margin-block-start: var(--spacing-block-sm); } h1, @@ -53,7 +54,7 @@ h4 { font-family: var(--font-serif); font-size: var(--font-size-6); font-weight: 700; - margin-block-start: var(--margin-block-sm); + margin-block-start: var(--spacing-block-sm); text-wrap: balance; } @@ -63,7 +64,7 @@ h4 { } :is(p, ol, ul):not(:first-child) { - margin-block-start: var(--margin-block-sm); + margin-block-start: var(--spacing-block-sm); } :is(p, h1, h2, h3, h4) { -- cgit v1.2.3 From 0cb6960f0c65c0d791ccdee2f5bc2e2b910cfb76 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <118172583+jcarstairs-scottlogic@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:16:42 +0000 Subject: Uses SCSS partials (#64) --- scss/base/_dl.scss | 5 ++++ scss/base/_index.scss | 4 +++ scss/base/_list.scss | 4 +++ scss/base/_theme.scss | 13 +++++++++ scss/base/_typography.scss | 72 ++++++++++++++++++++++++++++++++++++++++++++++ scss/base/dl.scss | 5 ---- scss/base/index.scss | 4 --- scss/base/list.scss | 4 --- scss/base/theme.scss | 13 --------- scss/base/typography.scss | 72 ---------------------------------------------- 10 files changed, 98 insertions(+), 98 deletions(-) create mode 100644 scss/base/_dl.scss create mode 100644 scss/base/_index.scss create mode 100644 scss/base/_list.scss create mode 100644 scss/base/_theme.scss create mode 100644 scss/base/_typography.scss delete mode 100644 scss/base/dl.scss delete mode 100644 scss/base/index.scss delete mode 100644 scss/base/list.scss delete mode 100644 scss/base/theme.scss delete mode 100644 scss/base/typography.scss (limited to 'scss/base') diff --git a/scss/base/_dl.scss b/scss/base/_dl.scss new file mode 100644 index 0000000..95cc836 --- /dev/null +++ b/scss/base/_dl.scss @@ -0,0 +1,5 @@ +dt { + font-weight: 700; + text-decoration: underline; + margin-top: 1rem; +} \ No newline at end of file diff --git a/scss/base/_index.scss b/scss/base/_index.scss new file mode 100644 index 0000000..f338772 --- /dev/null +++ b/scss/base/_index.scss @@ -0,0 +1,4 @@ +@use 'dl'; +@use 'list'; +@use 'theme'; +@use 'typography'; diff --git a/scss/base/_list.scss b/scss/base/_list.scss new file mode 100644 index 0000000..2fd402b --- /dev/null +++ b/scss/base/_list.scss @@ -0,0 +1,4 @@ +ol li { + list-style-type: decimal; + margin-inline-start: --spacing-inline-md; +} \ No newline at end of file diff --git a/scss/base/_theme.scss b/scss/base/_theme.scss new file mode 100644 index 0000000..f5d178c --- /dev/null +++ b/scss/base/_theme.scss @@ -0,0 +1,13 @@ +:root { + color: var(--text-color); + background-color: var(--background-color); +} + +:is(main, article) { + color: var(--text-color); + background-color: var(--background-color); +} + +:is(main, article) > section:not(:is(section, header) :is(section, header)) { + background-color: var(--background-color); +} \ No newline at end of file diff --git a/scss/base/_typography.scss b/scss/base/_typography.scss new file mode 100644 index 0000000..4dd0afb --- /dev/null +++ b/scss/base/_typography.scss @@ -0,0 +1,72 @@ +body { + font-family: var(--font-sans-serif); + font-size: var(--font-size-1); + font-weight: 400; + letter-spacing: 0.03rem; + line-height: 1.5; + word-wrap: break-word; + hyphens: auto; +} + +h1 { + font-size: var(--font-size-5); +} + +h1:not(:first-child) { + margin-block-start: var(--spacing-block-lg); +} + +h2 { + font-size: var(--font-size-4); +} + +h2:not(:first-child) { + margin-block-start: var(--spacing-block-lg); +} + +h3 { + font-size: var(--font-size-3); +} + +h3:not(:first-child) { + margin-block-start: var(--spacing-block-md); +} + +h4 { + font-size: var(--font-size-2); +} + +h4:not(:first-child) { + margin-block-start: var(--spacing-block-sm); +} + +h1, +h2, +h3, +h4 { + font-family: var(--font-serif); + font-weight: 700; + line-height: 1.15; + text-wrap: balance; +} + +.title { + font-family: var(--font-serif); + font-size: var(--font-size-6); + font-weight: 700; + margin-block-start: var(--spacing-block-sm); + text-wrap: balance; +} + +.title--small { + font-size: var(--font-size-2); + margin-block-start: 0; +} + +:is(p, ol, ul):not(:first-child) { + margin-block-start: var(--spacing-block-sm); +} + +:is(p, h1, h2, h3, h4) { + max-width: var(--width-prose); +} diff --git a/scss/base/dl.scss b/scss/base/dl.scss deleted file mode 100644 index 95cc836..0000000 --- a/scss/base/dl.scss +++ /dev/null @@ -1,5 +0,0 @@ -dt { - font-weight: 700; - text-decoration: underline; - margin-top: 1rem; -} \ No newline at end of file diff --git a/scss/base/index.scss b/scss/base/index.scss deleted file mode 100644 index f338772..0000000 --- a/scss/base/index.scss +++ /dev/null @@ -1,4 +0,0 @@ -@use 'dl'; -@use 'list'; -@use 'theme'; -@use 'typography'; diff --git a/scss/base/list.scss b/scss/base/list.scss deleted file mode 100644 index 2fd402b..0000000 --- a/scss/base/list.scss +++ /dev/null @@ -1,4 +0,0 @@ -ol li { - list-style-type: decimal; - margin-inline-start: --spacing-inline-md; -} \ No newline at end of file diff --git a/scss/base/theme.scss b/scss/base/theme.scss deleted file mode 100644 index f5d178c..0000000 --- a/scss/base/theme.scss +++ /dev/null @@ -1,13 +0,0 @@ -:root { - color: var(--text-color); - background-color: var(--background-color); -} - -:is(main, article) { - color: var(--text-color); - background-color: var(--background-color); -} - -:is(main, article) > section:not(:is(section, header) :is(section, header)) { - background-color: var(--background-color); -} \ No newline at end of file diff --git a/scss/base/typography.scss b/scss/base/typography.scss deleted file mode 100644 index 4dd0afb..0000000 --- a/scss/base/typography.scss +++ /dev/null @@ -1,72 +0,0 @@ -body { - font-family: var(--font-sans-serif); - font-size: var(--font-size-1); - font-weight: 400; - letter-spacing: 0.03rem; - line-height: 1.5; - word-wrap: break-word; - hyphens: auto; -} - -h1 { - font-size: var(--font-size-5); -} - -h1:not(:first-child) { - margin-block-start: var(--spacing-block-lg); -} - -h2 { - font-size: var(--font-size-4); -} - -h2:not(:first-child) { - margin-block-start: var(--spacing-block-lg); -} - -h3 { - font-size: var(--font-size-3); -} - -h3:not(:first-child) { - margin-block-start: var(--spacing-block-md); -} - -h4 { - font-size: var(--font-size-2); -} - -h4:not(:first-child) { - margin-block-start: var(--spacing-block-sm); -} - -h1, -h2, -h3, -h4 { - font-family: var(--font-serif); - font-weight: 700; - line-height: 1.15; - text-wrap: balance; -} - -.title { - font-family: var(--font-serif); - font-size: var(--font-size-6); - font-weight: 700; - margin-block-start: var(--spacing-block-sm); - text-wrap: balance; -} - -.title--small { - font-size: var(--font-size-2); - margin-block-start: 0; -} - -:is(p, ol, ul):not(:first-child) { - margin-block-start: var(--spacing-block-sm); -} - -:is(p, h1, h2, h3, h4) { - max-width: var(--width-prose); -} -- cgit v1.2.3