mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
refactor: use CSS variables for global colors and improve theme support (#668)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user