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: less to component token for Typography #42044
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #42044 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 640 640
Lines 10830 10831 +1
Branches 2943 2943
=========================================
+ Hits 10830 10831 +1
☔ View full report in Codecov by Sentry. |
| `@typography-title-margin-top` | `sizeMarginHeadingVerticalStart` | - | | ||
| `@typography-title-margin-bottom` | `sizeMarginHeadingVerticalEnd` | - | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 token 加到 Component Token 里,然后用后面的 token 初始化即可。margin 这类 token 很容易对其他地方的样式产生影响,所以不推荐直接用 global token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sizeMarginHeadingVerticalStart
和 sizeMarginHeadingVerticalEnd
是写在 Typography 组件的 component token 里面的,不是 global token。搜了一下全局只有 Typography 有这个 token。大佬确认一下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那应该改名叫 titleMarginTop
和 titleMarginBottom
了
<!-- prettier-ignore --> | ||
| less 变量 | Component Token | 备注 | | ||
| --- | --- | --- | | ||
| `@typography-title-font-weight` | - | 由于样式变化已废弃 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `@typography-title-font-weight` | - | 由于样式变化已废弃 | | |
| `@typography-title-font-weight` | `fontWeightStrong` | - | |
* chore: update miss ChangeLog * Update CHANGELOG.en-US.md Co-authored-by: MadCcc <1075746765@qq.com> * Update CHANGELOG.zh-CN.md * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 <afc163@gmail.com> * Update CHANGELOG.en-US.md * Update CHANGELOG.en-US.md Co-authored-by: afc163 <afc163@gmail.com> * Update CHANGELOG.en-US.md Co-authored-by: afc163 <afc163@gmail.com> * Update CHANGELOG.en-US.md * Update CHANGELOG.zh-CN.md --------- Co-authored-by: MadCcc <1075746765@qq.com> Co-authored-by: afc163 <afc163@gmail.com>
* demo: update popconfirm demo * demo: update snapshot
* fix: Popconfirm margin issue when icon is null * test: update snapshot * demo: update snapshot * chore: improve code * demo: update snapshot * refactor: remove used css * demo: update snapshot
Hi @jrr997. Thanks for your contribution. The path |
应该 merge feature 的 |
这个 PR 好像 reopen 不了了,重开一个吧 |
手欠点了同步master,我重开一个。 |
这可能就是当初禁用那个功能的原因了 @afc163 |
上游分支是 feature,应该不会同步 master 才对吧 |
重开了 #42442 |
我在自己fork的antd仓库点了 Sync Fork。 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
ref #41884
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 4c574de
This pull request updates the documentation for the Modal component to show how to migrate from less variables to component tokens for typography. It covers both the English and Chinese versions of
docs/react/migrate-less-variables.md
.🔍 Walkthrough
🤖 Generated by Copilot at 4c574de