Commit d1e0e8bcea1c168631222989969e14f7d0d1b6a4
1 parent
d3f08e37
fix(dark-theme): fixed `TreeSelect` & `DatePicker` theme
修复黑暗主题下的组件样式 fixed: #955
Showing
2 changed files
with
12 additions
and
1 deletions
build/vite/plugin/theme.ts
@@ -33,8 +33,10 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { | @@ -33,8 +33,10 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { | ||
33 | return s; | 33 | return s; |
34 | case '.ant-steps-item-icon > .ant-steps-icon': | 34 | case '.ant-steps-item-icon > .ant-steps-icon': |
35 | return s; | 35 | return s; |
36 | + case '.ant-select-item-option-selected:not(.ant-select-item-option-disabled)': | ||
37 | + return s; | ||
36 | } | 38 | } |
37 | - return `[data-theme] ${s}`; | 39 | + return s.startsWith('[data-theme') ? s : `[data-theme] ${s}`; |
38 | }, | 40 | }, |
39 | colorVariables: [...getThemeColors(), ...colors], | 41 | colorVariables: [...getThemeColors(), ...colors], |
40 | }), | 42 | }), |
@@ -49,6 +51,7 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { | @@ -49,6 +51,7 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { | ||
49 | darkModifyVars: { | 51 | darkModifyVars: { |
50 | ...generateModifyVars(true), | 52 | ...generateModifyVars(true), |
51 | 'text-color': '#c9d1d9', | 53 | 'text-color': '#c9d1d9', |
54 | + 'primary-1': 'rgb(255 255 255 / 8%)', | ||
52 | 'text-color-base': '#c9d1d9', | 55 | 'text-color-base': '#c9d1d9', |
53 | 'component-background': '#151515', | 56 | 'component-background': '#151515', |
54 | 'heading-color': 'rgb(255 255 255 / 65%)', | 57 | 'heading-color': 'rgb(255 255 255 / 65%)', |
src/design/theme.less
@@ -37,4 +37,12 @@ html[data-theme='light'] { | @@ -37,4 +37,12 @@ html[data-theme='light'] { | ||
37 | box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset, | 37 | box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset, |
38 | 0 1px 0 0 #434343 inset; | 38 | 0 1px 0 0 #434343 inset; |
39 | } | 39 | } |
40 | + | ||
41 | + .ant-calendar-selected-day .ant-calendar-date { | ||
42 | + color: rgba(0, 0, 0, 0.8); | ||
43 | + } | ||
44 | + | ||
45 | + .ant-select-tree li .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected { | ||
46 | + color: rgba(0, 0, 0, 0.9); | ||
47 | + } | ||
40 | } | 48 | } |