From e07d456ee85f2f2d23128544876034a8c40d2782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E5=A4=A7=E7=BE=8A?= Date: Thu, 16 May 2024 21:40:33 +0800 Subject: [PATCH] Optimize the use of color variables --- frontend/src/css/_shell.css | 18 ++++-------------- frontend/src/css/_variables.css | 4 ++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/frontend/src/css/_shell.css b/frontend/src/css/_shell.css index af65066c..1d2813a9 100644 --- a/frontend/src/css/_shell.css +++ b/frontend/src/css/_shell.css @@ -6,7 +6,7 @@ background: var(--surfacePrimary); color: var(--textPrimary); z-index: 9999; - background: rgba(255, 255, 255, 0.9); + background: var(--dividerSecondary); transition: 0.2s ease background; cursor: ns-resize; touch-action: none; @@ -14,15 +14,6 @@ width: 100%; } -:root.dark { - .shell { - background: rgba(30, 30, 30, 0.6); - } - .shell__text { - color: white; - } -} - .shell__divider{ background: rgba(127, 127, 127, 0.3); width: 100%; @@ -50,7 +41,7 @@ top: 0px; left: 0px; z-index: 9998; - background-color: rgba(0, 0, 0, 0.05); + background-color: var(--dividerPrimary); } body.rtl .shell-content { @@ -78,9 +69,7 @@ body.rtl .shell-content { font-size: inherit; } -.shell__text{ - color:black -} + .shell__prompt { width: 1.2rem; @@ -95,4 +84,5 @@ body.rtl .shell-content { font-family: inherit; white-space: pre-wrap; width: 100%; + color:var(--textSecondary); } diff --git a/frontend/src/css/_variables.css b/frontend/src/css/_variables.css index 468b08dd..a56285ba 100644 --- a/frontend/src/css/_variables.css +++ b/frontend/src/css/_variables.css @@ -31,6 +31,8 @@ --hover: rgba(0, 0, 0, 0.1); --borderPrimary: rgba(0, 0, 0, 0.1); --borderSecondary: rgba(0, 0, 0, 0.2); + --dividerPrimary: rgba(255, 255, 255, 0.4); + --dividerSecondary: rgba(255, 255, 255, 0.9); } :root.dark { @@ -51,4 +53,6 @@ --hover: rgba(255, 255, 255, 0.1); --borderPrimary: rgba(255, 255, 255, 0.05); --borderSecondary: rgba(255, 255, 255, 0.15); + --dividerPrimary: rgba(30, 30, 30, 0.4); + --dividerSecondary:rgba(30, 30, 30, 0.6); }