From 98258c14c72ca67a96af256afaea6ddc8dc19053 Mon Sep 17 00:00:00 2001 From: masquevil Date: Thu, 14 Mar 2024 18:22:22 +0800 Subject: [PATCH] =?UTF-8?q?[coc-card]=20theme=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/base.scss | 2 ++ src/assets/element-override.scss | 7 +++++-- src/main.ts | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/assets/base.scss b/src/assets/base.scss index f770ff0..1e04939 100644 --- a/src/assets/base.scss +++ b/src/assets/base.scss @@ -66,10 +66,12 @@ } .light, .theme-light { + color-scheme: light; @include theme-light-vars; } .dark, .theme-dark { + color-scheme: dark; @include theme-dark-vars; } diff --git a/src/assets/element-override.scss b/src/assets/element-override.scss index f42ebe3..d865b12 100644 --- a/src/assets/element-override.scss +++ b/src/assets/element-override.scss @@ -4,14 +4,17 @@ margin-top: env(safe-area-inset-top); } .el-message--error { + --el-message-bg-color: hsl(350, 50%, 95%); --el-message-border-color: hsl(350, 60%, 80%); --el-message-text-color: hsl(350, 100%, 35%); } .el-message--success { - --el-message-border-color: hsl(150, 60%, 30%); - --el-message-text-color: hsl(150, 100%, 20%); + --el-message-bg-color: hsl(100, 50%, 95%); + --el-message-border-color: hsl(100, 60%, 30%); + --el-message-text-color: hsl(100, 100%, 20%); } .el-message--info { + --el-message-bg-color: hsl(190, 50%, 95%); --el-message-border-color: hsl(190, 60%, 30%); --el-message-text-color: hsl(190, 100%, 20%); } diff --git a/src/main.ts b/src/main.ts index bef7b0e..8fe6c81 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,7 @@ import { createApp } from 'vue'; import App from './App.vue'; import ElementPlus from 'element-plus'; import 'element-plus/dist/index.css'; +import 'element-plus/theme-chalk/dark/css-vars.css'; import router from './router'; import lean from './plugins/lean';