-
Notifications
You must be signed in to change notification settings - Fork 269
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: optimize basic variables and switch the overall rounded corner … #2580
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,9 @@ | |
// 表头文本色 | ||
--tv-DateTable-th-text-color: var(--tv-color-text-weaken, #808080); | ||
// 单元格圆角 | ||
--tv-DateTable-td-border-radius: var(--tv-border-radius-round, 999px); | ||
--tv-DateTable-td-border-radius: var(--tv-border-radius-brand, 999px); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update fallback values to match the new design system The changes switch from Apply this change to all affected border-radius variables: - --tv-DateTable-td-border-radius: var(--tv-border-radius-brand, 999px);
+ --tv-DateTable-td-border-radius: var(--tv-border-radius-brand, 2px);
- --tv-DateTable-border-radius-current-select: var(--tv-border-radius-brand, 999px);
+ --tv-DateTable-border-radius-current-select: var(--tv-border-radius-brand, 2px);
- --tv-DateTable-td-today-border-radius: var(--tv-border-radius-brand, 999px);
+ --tv-DateTable-td-today-border-radius: var(--tv-border-radius-brand, 2px);
- --tv-DateTable-start-date-border-radius: var(--tv-border-radius-brand, 999px);
+ --tv-DateTable-start-date-border-radius: var(--tv-border-radius-brand, 2px);
- --tv-DateTable-cell-border-radius-selected: var(--tv-border-radius-brand, 999px);
+ --tv-DateTable-cell-border-radius-selected: var(--tv-border-radius-brand, 2px);
- --tv-DateTable-td-border-radius-disabled: var(--tv-border-radius-brand, 999px);
+ --tv-DateTable-td-border-radius-disabled: var(--tv-border-radius-brand, 2px); Also applies to: 36-36, 63-63, 74-74, 76-76, 80-80 |
||
// 选中项的圆角 | ||
--tv-DateTable-border-radius-current-select: var(--tv-border-radius-round, 999px); | ||
--tv-DateTable-border-radius-current-select: var(--tv-border-radius-brand, 999px); | ||
// 上个月文本色 | ||
--tv-DateTable-td-pre-month-text-color: var(--tv-color-text-weaken, #808080); | ||
// 选中日期文本色 | ||
|
@@ -60,7 +60,7 @@ | |
// 今天的高度 | ||
--tv-DateTable-td-today-height: var(--tv-size-height-sm, 28px); | ||
// 今天的圆角 | ||
--tv-DateTable-td-today-border-radius: var(--tv-border-radius-round, 999px); | ||
--tv-DateTable-td-today-border-radius: var(--tv-border-radius-brand, 999px); | ||
// 今天的边框色 | ||
--tv-DateTable-td-today-circle-border-color: var(--tv-color-border-active, #191919); | ||
|
||
|
@@ -71,13 +71,13 @@ | |
// 单元格顶部间距 | ||
--tv-DateTable-td-span-top: 3px; | ||
// 开始日期圆角 | ||
--tv-DateTable-start-date-border-radius: var(--tv-border-radius-round, 999px); | ||
--tv-DateTable-start-date-border-radius: var(--tv-border-radius-brand, 999px); | ||
// 选中日期圆角 | ||
--tv-DateTable-cell-border-radius-selected: var(--tv-border-radius-round, 999px); | ||
--tv-DateTable-cell-border-radius-selected: var(--tv-border-radius-brand, 999px); | ||
// 行高 | ||
--tv-DateTable-tr-line-height: var(--tv-line-height-number, 1.5); | ||
// 禁用单元格圆角 | ||
--tv-DateTable-td-border-radius-disabled: var(--tv-border-radius-round, 999px); | ||
--tv-DateTable-td-border-radius-disabled: var(--tv-border-radius-brand, 999px); | ||
// 星期行高 | ||
--tv-DateTable-week-height: var(--tv-size-height-md, 32px); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,17 +28,17 @@ | |
) | ||
0; | ||
// 单元格圆角(选中) | ||
--tv-MonthTable-cell-border-radius: var(--tv-border-radius-round, 999px); | ||
--tv-MonthTable-cell-border-radius: var(--tv-border-radius-brand, 999px); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent border-radius variable usage detected across components Several components are still using
For consistency with the MonthTable changes and the broader styling update, these components should also use 🔗 Analysis chainLGTM! Verify visual consistency across states The change from Let's verify this change is consistent across the component library: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining usage of the old border-radius variable
rg --type=less "tv-border-radius-round" packages/theme/src/
Length of output: 1358 |
||
// 单元格圆角(开始月份) | ||
--tv-MonthTable-cell-border-radius-start: var(--tv-border-radius-round, 999px) 0 0 | ||
var(--tv-border-radius-round, 999px); | ||
--tv-MonthTable-cell-border-radius-start: var(--tv-border-radius-brand, 999px) 0 0 | ||
var(--tv-border-radius-brand, 999px); | ||
// 单元格圆角(结束月份) | ||
--tv-MonthTable-cell-border-radius-end: 0 var(--tv-border-radius-round, 999px) var(--tv-border-radius-round, 999px) 0; | ||
--tv-MonthTable-cell-border-radius-end: 0 var(--tv-border-radius-brand, 999px) var(--tv-border-radius-brand, 999px) 0; | ||
// 选中月份每行第一个单元格的圆角 | ||
--tv-MonthTable-cell-border-radius-first: var(--tv-border-radius-round, 999px) 0 0 | ||
var(--tv-border-radius-round, 999px); | ||
--tv-MonthTable-cell-border-radius-first: var(--tv-border-radius-brand, 999px) 0 0 | ||
var(--tv-border-radius-brand, 999px); | ||
// 选中月份每行最后一个单元格的圆角 | ||
--tv-MonthTable-cell-border-radius-last: 0 var(--tv-border-radius-round, 999px) var(--tv-border-radius-round, 999px) 0; | ||
--tv-MonthTable-cell-border-radius-last: 0 var(--tv-border-radius-brand, 999px) var(--tv-border-radius-brand, 999px) 0; | ||
|
||
// 单元格边框色(选中) | ||
--tv-MonthTable-cell-border-color-today: var(--tv-color-border-active, #191919); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ | |
// 分页页码项默认悬浮边框色 | ||
--tv-Pager-page-item-border-color-hover: transparent; | ||
// 分页页码项项圆角 | ||
--tv-Pager-page-item-border-radius: var(--tv-border-radius-round); | ||
--tv-Pager-page-item-border-radius: var(--tv-border-radius-brand); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistency found in border radius styling across components Several components still use
This change should be part of a broader effort to standardize border radius styling using 🔗 Analysis chainLGTM! Verify consistency across components. The change from Let's verify that this change is consistent with other components: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any remaining usage of --tv-border-radius-round
# and confirm consistent usage of --tv-border-radius-brand across components
echo "Checking for any remaining --tv-border-radius-round usage..."
rg --type=less "border-radius-round" packages/theme/src/
echo "Verifying consistent --tv-border-radius-brand usage..."
rg --type=less "border-radius-brand" packages/theme/src/
Length of output: 4237 |
||
// 分页页码悬浮字重 | ||
--tv-Pager-page-item-font-weight-hover: var(--tv-font-weight-bold); | ||
// 分页页码项最小宽度 | ||
|
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.
💡 Codebase verification
Consider updating border-radius declarations to use the new brand variable
Based on the verification results, we found:
border-radius: 50%
for circular elements (avatars, dots, icons)border-radius: 999px
that could benefit from the new variable--tv-border-radius-brand
(only in pager and guide components)Suggested updates:
border-radius: 50%
for truly circular elements like avatars and dots--tv-border-radius-brand
:packages/theme-mobile/src/button/index.less
)packages/theme-mobile/src/switch/index.less
)packages/theme-mobile/src/radio/index.less
)packages/theme-mobile/src/numeric/index.less
)🔗 Analysis chain
Verify consistent border radius usage across components
Let's ensure the new brand border radius is being applied consistently and there aren't any hardcoded border radius values that should be using this variable instead.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 6277