-
Notifications
You must be signed in to change notification settings - Fork 7.7k
fix(use-design-tokens): 完善element-plus暗色主题颜色 #6224
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(use-design-tokens): 完善element-plus暗色主题颜色 #6224
Conversation
|
WalkthroughThe update enhances the Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
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/effects/hooks/src/use-design-tokens.ts (1)
238-238
: Minor: Consider removing this empty lineThis empty line appears to be unintentional and doesn't contribute to code readability.
'--el-color-info-light-9': getCssVariableValue('--info'), // getCssVariableValue('--secondary'), - '--el-color-primary': getCssVariableValue('--primary-500'),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
packages/effects/hooks/src/use-design-tokens.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Check (windows-latest)
- GitHub Check: Check (ubuntu-latest)
- GitHub Check: Test (windows-latest)
- GitHub Check: Lint (ubuntu-latest)
- GitHub Check: Lint (windows-latest)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: post-update (windows-latest)
- GitHub Check: post-update (ubuntu-latest)
🔇 Additional comments (2)
packages/effects/hooks/src/use-design-tokens.ts (2)
196-297
: Well-implemented theme-aware color system adjustments!The conditional logic for color variables based on
isDark.value
correctly addresses the color abnormalities in dark theme mode. The implementation:
- Systematically inverts color shade selection for dark/light modes across all color categories (danger, error, primary, success, warning)
- Applies a consistent pattern where darker shades are used in light mode and lighter shades in dark mode
- Maintains visual hierarchy and contrast in both themes
This approach ensures proper color contrast and visibility in both themes, fixing the issue with abnormal colors in dark mode.
235-235
: Good addition of border color to info light variantSetting
--el-color-info-light-5
to use the border color variable completes the theme integration and ensures consistent styling.
Description
解决
element-plus
目前暗主题模式下,颜色异常的问题优化前:
优化后:
Type of change
Please delete options that are not relevant.
Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit