refactor: use CSS variables for global colors and improve theme support (#668)

This commit is contained in:
Cell
2025-12-26 14:16:59 +08:00
committed by GitHub
parent 3f5d0e0583
commit 37a799b2cb
18 changed files with 69 additions and 163 deletions
+2 -6
View File
@@ -79,15 +79,11 @@ FixIt/
### 样式组织原则
1. **主题切换支持**: 使用数据属性选择器
1. **主题切换支持**: 使用 CSS 变量实现主题切换
```scss
.element {
color: $global-font-color;
[data-theme='dark'] & {
color: $global-font-color-dark;
}
color: var(#{$rootPrefix}global-font-color);
}
```