-
Notifications
You must be signed in to change notification settings - Fork 284
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
refactor(time-select): [time-select] refactor the theme #2275
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
32625b0
refactor(time-select): [time-select] refactor the theme
Youyou-smiles 755a52a
refactor(time-select): [time-select] refactor the theme
Youyou-smiles 585744b
refactor(time-select): [time-select] refactor the theme
Youyou-smiles cdde57a
refactor(time-select): [time-select] refactor the theme
Youyou-smiles f57916d
refactor(time-select): [time-select] refactor the theme
Youyou-smiles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,28 +10,21 @@ | |
* | ||
*/ | ||
|
||
.component-css-vars-time-select() { | ||
// 时间选择选项高度 | ||
--ti-time-select-item-height: var(--ti-common-size-height-normal, 32px); | ||
.inject-TimeSelect-vars() { | ||
// 时间选择选项字体色 | ||
--ti-time-select-item-text-color: var(--ti-common-color-text-primary, #191919); | ||
--tv-TimeSelect-item-text-color: var(--tv-color-act-primary-text); | ||
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. 这里不是像button那样的交互类组件,所以用这个变量是不准确的,应该用:--tv-color-text |
||
// 时间选择选项字号 | ||
--ti-time-select-item-font-size: var(--ti-common-font-size-base, 14px); | ||
// 时间选择选项行高 | ||
--ti-time-select-item-line-height: var(--ti-common-size-height-normal, 32px); | ||
--tv-TimeSelect-item-font-size: var(--tv-font-size-md); | ||
// 时间选择选项左右内边距 | ||
--ti-time-select-item-padding-horizontal: var(--ti-common-space-4x, 16px); | ||
--tv-TimeSelect-item-padding-horizontal: var(--tv-space-xl); | ||
// 时间选择选项悬浮背景色 | ||
--ti-time-select-item-hover-bg-color: var(--ti-common-color-bg-normal, #f5f5f5); | ||
--tv-TimeSelect-item-hover-bg-color: var(--tv-color-bg-hover); | ||
// 时间选择选项禁用文本色 | ||
--ti-time-select-item-disabled-text-color: var(--ti-common-color-text-disabled, #c2c2c2); | ||
--tv-TimeSelect-item-disabled-text-color: var(--tv-color-text-disabled); | ||
// 时间选择选项悬浮背景色(选中项) | ||
--ti-time-select-item-select-hover-bg-color: var(--ti-common-color-selected-background, #f5f5f5); | ||
--tv-TimeSelect-item-select-hover-bg-color: var(--tv-color-bg-active); | ||
// 时间选择选项字体色(选中项) | ||
--ti-time-select-item-selected-text-color: var(--ti-common-color-text-highlight, #1476ff); | ||
--tv-TimeSelect-item-selected-text-color: var(--tv-color-text-active); | ||
// 面板高度 | ||
--ti-time-select-height: 242px; | ||
--ti-time-select-scrollbar-height: 242px; | ||
--ti-time-select-scrollbar-wrap-max-height: unset; | ||
--ti-time-select-content-padding-top: var(--ti-common-space-2x, 8px); | ||
--tv-TimeSelect-content-padding-top: var(--tv-space-md); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Reconsider using fixed height values and 'unset'.
The changes from variable references to fixed height values (242px) and 'unset' for max-height raise some concerns:
Consider reverting to using variables for these properties to maintain flexibility and consistency.
Suggested changes:
This approach allows for easy theming while providing default values.
📝 Committable suggestion