fix(theme): make sure the steps style is correct, fix #414

This commit is contained in:
Vben
2021-04-10 22:16:06 +08:00
parent 37c5741601
commit 640a2c1798
3 changed files with 26 additions and 16 deletions

View File

@@ -22,7 +22,17 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
});
const plugin = [
viteThemePlugin({
resolveSelector: (s) => `[data-theme] ${s}`,
resolveSelector: (s) => {
s = s.trim();
switch (s) {
case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon':
return '.ant-steps-item-icon > .ant-steps-icon';
case '.ant-steps-item-icon > .ant-steps-icon':
return s;
}
return `[data-theme] ${s}`;
},
colorVariables: [...getThemeColors(), ...colors],
}),
antdDarkThemePlugin({