-
-
Notifications
You must be signed in to change notification settings - Fork 49.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: dark palette preview #20281
feat: dark palette preview #20281
Conversation
Deploy preview for ant-design ready! Built with commit 090f258 |
bec1140
to
e53a05c
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 090f258:
|
Codecov Report
@@ Coverage Diff @@
## 4.0-prepare #20281 +/- ##
===============================================
- Coverage 97.57% 97.54% -0.03%
===============================================
Files 295 295
Lines 6771 6773 +2
Branches 1869 1871 +2
===============================================
Hits 6607 6607
- Misses 164 166 +2
Continue to review full report at Codecov.
|
fix: dark css dist error caused by variables
作为临时方案我觉得是足够了 |
|
|
加一个暗色主题的 bundle size 检测:https://github.com/ant-design/ant-design/blob/4.0-prepare/package.json#L255 |
遗留问题
全局主题切换
运行站点前,先执行一下
node scripts/generateColorLess.js
,使用 less 模拟 webpack 模块依赖 resolve,编译出一份dark.css
。然后切换直接动态加
dark.css
局部主题切换site
前,先npm run dist
下,编译出antd.dark.css
data-theme={theme}
,添加对应的样式就可以进行局部切换:
不好的点
run site
,因为依赖了dist
和lib
目录。期待解决
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge