The theme color changes according to the system theme
主题色根据系统主题变换
import 'antd/dist/antd.dark.css'
加载这个样式后,并不是直接应用到全局,而是可以通过一个类名,比如 <body class="dark">
来切换主题。
再或者是把 less 颜色变量暴露到 css var
:root {
--red: #ff6347;
--yellow: #ffc107;
--blue: #6495ed;
}
@media screen and (prefers-color-scheme: dark) {
:root {
color: #ddd;
--red: #ad1a00;
--blue: #1346a4;
}
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too