From d1e0e8bcea1c168631222989969e14f7d0d1b6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Fri, 23 Jul 2021 00:35:40 +0800 Subject: [PATCH] fix(dark-theme): fixed `TreeSelect` & `DatePicker` theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复黑暗主题下的组件样式 fixed: #955 --- build/vite/plugin/theme.ts | 5 ++++- src/design/theme.less | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build/vite/plugin/theme.ts b/build/vite/plugin/theme.ts index d8ffe0ef0..a05a8d647 100644 --- a/build/vite/plugin/theme.ts +++ b/build/vite/plugin/theme.ts @@ -33,8 +33,10 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { return s; case '.ant-steps-item-icon > .ant-steps-icon': return s; + case '.ant-select-item-option-selected:not(.ant-select-item-option-disabled)': + return s; } - return `[data-theme] ${s}`; + return s.startsWith('[data-theme') ? s : `[data-theme] ${s}`; }, colorVariables: [...getThemeColors(), ...colors], }), @@ -49,6 +51,7 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { darkModifyVars: { ...generateModifyVars(true), 'text-color': '#c9d1d9', + 'primary-1': 'rgb(255 255 255 / 8%)', 'text-color-base': '#c9d1d9', 'component-background': '#151515', 'heading-color': 'rgb(255 255 255 / 65%)', diff --git a/src/design/theme.less b/src/design/theme.less index 8eff3fdda..cde98c497 100644 --- a/src/design/theme.less +++ b/src/design/theme.less @@ -37,4 +37,12 @@ html[data-theme='light'] { box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset, 0 1px 0 0 #434343 inset; } + + .ant-calendar-selected-day .ant-calendar-date { + color: rgba(0, 0, 0, 0.8); + } + + .ant-select-tree li .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected { + color: rgba(0, 0, 0, 0.9); + } }