From a1cabdeaaf3bade1bd0872bcafc52c81f1c31ce8 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:13:30 +0100 Subject: 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 --- scss/layout/grid.scss | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scss/layout/grid.scss (limited to 'scss/layout/grid.scss') diff --git a/scss/layout/grid.scss b/scss/layout/grid.scss new file mode 100644 index 0000000..25cdd95 --- /dev/null +++ b/scss/layout/grid.scss @@ -0,0 +1,30 @@ +:is( + header, + footer, + nav, + :is(main, article) > section:not(:is(section, header) :is(section, header)) +):not(.section--full-width) { + padding-inline: calc(var(--grid-padding) + 0.5 * (100vw - var(--grid-total-width))); +} + +.grid-span-1 { + width: var(--grid-column-width); +} + +/* On screens narrower than 16rem, there is only one column. */ + +.grid-span-2 { + width: var(--grid-column-width); +} + +.grid-span-3 { + width: var(--grid-column-width); +} + +.width-prose { + width: var(--prose-width); +} + +.grid-span-full { + width: var(--grid-total-width); +} -- cgit v1.2.3