-
Notifications
You must be signed in to change notification settings - Fork 275
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(grid): [grid] fix checkbox border become smaller when config show… #2762
Conversation
WalkthroughThe pull request introduces a modification to the CSS styles for the grid checkbox component in the theme package. The change replaces hardcoded dimensions with CSS variables, specifically updating the width and height of the checkbox icon to use Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Walkthrough此PR修复了在配置 Changes
|
@@ -30,8 +30,8 @@ | |||
& + .@{grid-checkbox-prefix-cls}__icon { | |||
position: relative; | |||
display: block; | |||
width: 1em; | |||
height: 1em; | |||
width: var(--tv-Grid-icon-size); |
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.
The change from fixed 1em
to var(--tv-Grid-icon-size)
for width and height ensures that the checkbox icon size is consistent with the grid's icon size settings, which should resolve the issue with the checkbox border appearing smaller when show-overflow
is configured.
WalkthroughThis PR fixes the problem that the checkbox border becomes smaller after configuring Changes
|
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 (1)
packages/theme/src/grid/checkbox.less (1)
33-34
: Document the --tv-Grid-icon-size variable.Consider adding documentation for the
--tv-Grid-icon-size
CSS variable, including:
- Its default value
- Valid units/ranges
- Its relationship with other grid variables
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/theme/src/grid/checkbox.less
(1 hunks)
🔇 Additional comments (1)
packages/theme/src/grid/checkbox.less (1)
33-34
: LGTM! Good fix for the checkbox sizing issue.Using the CSS variable
--tv-Grid-icon-size
for both width and height ensures consistent checkbox dimensions, preventing the border from becoming smaller when show-overflow is enabled. This is a more maintainable approach than hardcoded values.
…-overflow
PR
修复当配置了show-overflow后复选框边框变小
修复前:
修复后:
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit