From a4e49e286f37bff306f381aad0cc09e8d292482a Mon Sep 17 00:00:00 2001 From: Ice Lam Date: Tue, 2 Apr 2024 17:16:24 +0800 Subject: [PATCH] refactor: remove unused css rules used for theming --- src/assets/scss/_base.scss | 13 ------------- src/assets/scss/_colors.scss | 13 ++----------- src/assets/scss/_inputs.scss | 10 +++------- src/assets/scss/_slot.scss | 7 +------ 4 files changed, 6 insertions(+), 37 deletions(-) diff --git a/src/assets/scss/_base.scss b/src/assets/scss/_base.scss index f0127ad..d4c055d 100644 --- a/src/assets/scss/_base.scss +++ b/src/assets/scss/_base.scss @@ -51,19 +51,6 @@ body { color: $color-text-light; } -.theme--purple { - background: linear-gradient( - 0deg, - $color-purple-step1 0.13%, - $color-purple-step2 23.02%, - $color-purple-step3 46.22%, - $color-purple-step4 69.56%, - $color-purple-step5 92.87%, - $color-purple-step6 100% - ); - color: $color-text-light; -} - .main { @include flex-center; padding: 3.125rem 0; diff --git a/src/assets/scss/_colors.scss b/src/assets/scss/_colors.scss index d06f33b..be522d4 100644 --- a/src/assets/scss/_colors.scss +++ b/src/assets/scss/_colors.scss @@ -10,13 +10,6 @@ $color-red-step3: #ff3634; $color-red-step4: #ff223c; $color-red-step5: #ff0c45; -$color-purple-step1: #7e3efd; -$color-purple-step2: #7b3df9; -$color-purple-step3: #7039ed; -$color-purple-step4: #5f32d8; -$color-purple-step5: #4828bc; -$color-purple-step6: #3f25b2; - $color-yellow: #ffbf1f; $color-blood-orange: #e54c23; $color-shadow: rgba($color-black, 0.2); @@ -45,8 +38,7 @@ $color-slot-text: $color-black; // settings $color-settings-mask: rgba($color-black, 0.6); -$color-settings-background-red: darken($color-red-step5, 8%); -$color-settings-background-purple: darken($color-purple-step6, 8%); +$color-settings-background: darken($color-red-step5, 8%); // textarea $color-input-background: $color-light-grey; @@ -55,5 +47,4 @@ $color-input-text: $color-black; // switch $color-switch-handle-disabled: $color-dark-grey; -$color-switch-handle-red: darken($color-red-step5, 8%); -$color-switch-handle-purple: darken($color-purple-step6, 8%); +$color-switch-handle: darken($color-red-step5, 8%); diff --git a/src/assets/scss/_inputs.scss b/src/assets/scss/_inputs.scss index a9ca967..10098f4 100644 --- a/src/assets/scss/_inputs.scss +++ b/src/assets/scss/_inputs.scss @@ -89,7 +89,8 @@ height: $switch-slider-height; border-radius: $switch-slider-height; flex: 0 0 $switch-slider-width; - @include shadow('small') margin: 0 0 0 1rem; + @include shadow('small'); + margin: 0 0 0 1rem; .slider { position: absolute; @@ -133,11 +134,6 @@ .theme--red .input--switch { input:checked + .slider:before { - background-color: $color-switch-handle-red; - } -} -.theme--purple .input--switch { - input:checked + .slider:before { - background-color: $color-switch-handle-purple; + background-color: $color-switch-handle; } } diff --git a/src/assets/scss/_slot.scss b/src/assets/scss/_slot.scss index be08eee..23cc97e 100644 --- a/src/assets/scss/_slot.scss +++ b/src/assets/scss/_slot.scss @@ -187,12 +187,7 @@ } .theme--red .settings__panel { - background-color: $color-settings-background-red; - color: $color-text-light; -} - -.theme--purple .settings__panel { - background-color: $color-settings-background-purple; + background-color: $color-settings-background; color: $color-text-light; }