-
Notifications
You must be signed in to change notification settings - Fork 287
fix: 更正正黑字体 #3363
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
fix: 更正正黑字体 #3363
Conversation
Walkthrough在 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat_v3.x #3363 +/- ##
==========================================
Coverage 88.15% 88.15%
==========================================
Files 291 291
Lines 19212 19212
Branches 2987 2988 +1
==========================================
+ Hits 16936 16937 +1
+ Misses 2270 2269 -1
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (5)
src/packages/price/price.scss (1)
12-12: 字体族改名一致性已对齐,建议去重并增加回退字体族
- 这三处使用 JDZH-Bold 与全局命名一致,OK。
- darkgray/primary 内重复声明同一 font-family,属冗余,可删以降低特异性叠加与样式体积。
- 建议为自定义字体增加系统回退,避免加载失败时数字样式退化明显;同时可抽成变量/混入统一使用。
可选精简示例(删除重复声明):
.nut-price-darkgray .nut-price { &-symbol, &-integer, &-decimal { - font-family: 'JDZH-Bold'; color: $price-darkgray-color; } } .nut-price-primary .nut-price { &-symbol, &-integer, &-decimal { - font-family: 'JDZH-Bold'; color: $price-primary-color; } }如需回退栈,可改为:
- font-family: 'JDZH-Bold'; + font-family: 'JDZH-Bold', 'Helvetica Neue', Arial, sans-serif;Also applies to: 21-21, 32-32
src/packages/rate/rate.scss (1)
103-103: 改名对齐良好,建议补充系统回退并参数化为提升稳健性与可维护性,建议:
- 增加系统回退字体,避免自定义字体未命中时观感突变;
- 抽取
$font-family-jd-regular变量或 mixin,避免在多处硬编码。示例:
- font-family: 'JDZH-Regular'; + font-family: 'JDZH-Regular', 'Helvetica Neue', Arial, sans-serif;src/packages/badge/badge.scss (1)
61-61: 字体族命名已统一,建议加入回退与变量化与全局改名一致;为稳健起见建议添加系统回退,并在样式层定义统一变量以便后续替换与主题化。
- font-family: 'JDZH-Regular'; + font-family: 'JDZH-Regular', 'Helvetica Neue', Arial, sans-serif;src/packages/countdown/countdown.scss (1)
19-19: 字体族改名对齐OK,建议加回退栈并核对相邻变量拼写
- 建议添加系统回退以增强稳健性:
- font-family: 'JDZH-Regular'; + font-family: 'JDZH-Regular', 'Helvetica Neue', Arial, sans-serif;
- 旁边 Line 16 的
$coutdown-font-weight似为拼写错误,是否应为$countdown-font-weight?请确认以免变量未命中。src/styles/jd-font.scss (1)
2-2: 无需兼容扫描:旧JD/JD-Bold引用已替换,无残留
可选:统一同一家族,仅通过font-weight(400/700)切换样式,简化命名与选择器。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/packages/badge/badge.scss(1 hunks)src/packages/countdown/countdown.scss(1 hunks)src/packages/price/price.scss(3 hunks)src/packages/rate/rate.scss(1 hunks)src/styles/jd-font.scss(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: lint
- GitHub Check: build
- GitHub Check: test
🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
☑️ 请求合并前的自查清单
Summary by CodeRabbit