summaryrefslogtreecommitdiff
path: root/scss/base/typography.scss
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-10-19 23:13:30 +0100
committerGitHub <noreply@github.com>2023-10-19 23:13:30 +0100
commita1cabdeaaf3bade1bd0872bcafc52c81f1c31ce8 (patch)
treecd9c075bbd590a65081cf2f97052a4087897cf55 /scss/base/typography.scss
parentd26ea8906e2a2c96ecfdea48ab4f0c8343eabf50 (diff)
Optimise CSS (#17)
* Installs Sass * installs concurrently * Ports CSS to SCSS * Gitignores CSS build output * Moves public/main.css to scss/index.scss * Fixes port to SCSS * Use-ifies base styles * Use-ifies layout styles * Use-ifies modules styles * Use-ifies variables * Use-ifies utils * Moves normalize to scss * Implements a CSS minifying step with CSSO --------- Co-authored-by: Joe Carstairs <jcarstairs@scottlogic.com>
Diffstat (limited to 'scss/base/typography.scss')
-rw-r--r--scss/base/typography.scss68
1 files changed, 68 insertions, 0 deletions
diff --git a/scss/base/typography.scss b/scss/base/typography.scss
new file mode 100644
index 0000000..fb2ac17
--- /dev/null
+++ b/scss/base/typography.scss
@@ -0,0 +1,68 @@
+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;
+}
+
+h1 {
+ font-size: var(--font-size-5);
+}
+
+h1:not(:first-child) {
+ margin-block-start: var(--margin-block-lg);
+}
+
+h2 {
+ font-size: var(--font-size-4);
+}
+
+h2:not(:first-child) {
+ margin-block-start: var(--margin-block-lg);
+}
+
+h3 {
+ font-size: var(--font-size-3);
+}
+
+h3:not(:first-child) {
+ margin-block-start: var(--margin-block-md);
+}
+
+h4 {
+ font-size: var(--font-size-2);
+}
+
+h4:not(:first-child) {
+ margin-block-start: var(--margin-block-sm);
+}
+
+h1,
+h2,
+h3,
+h4 {
+ font-family: var(--font-serif);
+ font-weight: 700;
+}
+
+.title {
+ font-family: var(--font-serif);
+ font-size: var(--font-size-6);
+ font-weight: 700;
+ margin-block-start: var(--margin-block-sm);
+}
+
+.title--small {
+ font-size: var(--font-size-2);
+ margin-block-start: 0;
+}
+
+p:not(:first-child) {
+ margin-block-start: var(--margin-block-sm);
+}
+
+:is(p, h1, h2, h3, h4) {
+ max-width: var(--width-prose);
+}