From 4dce8354f79537bd12f318fe70bdb5ba5ea95696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sun, 11 Jun 2023 19:46:55 +0200 Subject: [PATCH] refactor: separate CSS variables into file --- apps/website/src/style/_base.scss | 27 ++++------------------ apps/website/src/style/_variables-css.scss | 17 ++++++++++++++ apps/website/src/style/global.scss | 1 + 3 files changed, 22 insertions(+), 23 deletions(-) create mode 100644 apps/website/src/style/_variables-css.scss diff --git a/apps/website/src/style/_base.scss b/apps/website/src/style/_base.scss index bd5314f..943138f 100644 --- a/apps/website/src/style/_base.scss +++ b/apps/website/src/style/_base.scss @@ -1,29 +1,13 @@ -// CSS Variables -:root { - // Sizes - --container-width: #{$container-width}; - - // Offsets - --switcher-offset: 16px; - - // Animation - --ease-quart: cubic-bezier(.165, .84, .44, 1); - --ease-cubic: cubic-bezier(.785, .135, .15, .86); - --ease-inout-quart: cubic-bezier(.76, 0, .24, 1); -} -@include bp (sm) { - :root { - // Offsets - --switcher-offset: clamp(20px, 3vw, 40px); - } -} - html { font: #{$base-font-size}/1.2 $font-sans; font-weight: 400; color: #fff; min-width: 320px; word-break: normal; + + &.block-scroll { + overflow: hidden; + } } body { @include font-smooth; @@ -33,9 +17,6 @@ body { overflow-x: hidden; overscroll-behavior: none; - &.block-scroll { - overflow: hidden; - } &.is-loading * { cursor: wait !important; } diff --git a/apps/website/src/style/_variables-css.scss b/apps/website/src/style/_variables-css.scss new file mode 100644 index 0000000..aa98519 --- /dev/null +++ b/apps/website/src/style/_variables-css.scss @@ -0,0 +1,17 @@ +:root { + // Sizes + --container-width: #{$container-width}; + + // Offsets + --switcher-offset: 16px; + + // Animation + --ease-quart: cubic-bezier(.165, .84, .44, 1); + --ease-cubic: cubic-bezier(.785, .135, .15, .86); + --ease-inout-quart: cubic-bezier(.76, 0, .24, 1); + + @include bp (sm) { + // Offsets + --switcher-offset: clamp(20px, 3vw, 40px); + } +} diff --git a/apps/website/src/style/global.scss b/apps/website/src/style/global.scss index dcee4ea..67717b2 100644 --- a/apps/website/src/style/global.scss +++ b/apps/website/src/style/global.scss @@ -7,6 +7,7 @@ @import "tools/helpers"; // Base +@import "variables-css"; @import "base"; @import "fonts"; @import "typography";