fix(theme): button gradient color and add line-height back#2771
fix(theme): button gradient color and add line-height back#2771Timeless0911 merged 2 commits intomainfrom
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the gradient styling in the theme by extracting a hardcoded color value into a CSS variable and applies consistent styling. The changes improve maintainability by eliminating duplicate gradient definitions and add a line-height property to documentation content.
- Introduces a new CSS variable
--rp-home-hero-secondary-colorfor the gradient's secondary color (#a673ff) - Refactors the button component to reuse the existing gradient variable instead of duplicating the gradient definition
- Adds a base line-height of 1.75rem to documentation content
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/core/src/theme/styles/vars/home-vars.css | Introduces --rp-home-hero-secondary-color variable and uses it in the light mode gradient |
| packages/core/src/theme/components/Button/index.scss | Refactors to use --rp-home-hero-title-bg variable instead of duplicating gradient definition |
| packages/core/src/theme/components/DocContent/doc.scss | Adds base line-height of 1.75rem to documentation content |
Comments suppressed due to low confidence (1)
packages/core/src/theme/styles/vars/home-vars.css:46
- The dark mode gradient (line 46) still uses the hardcoded color
#a673ffinstead of the new--rp-home-hero-secondary-colorvariable. This creates inconsistency with the light mode implementation. Consider also defining--rp-home-hero-secondary-colorin the dark mode section or using the variable from light mode to maintain consistency.
#a673ff 100%
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff Analysis📁 webPath:
Generated by Rsdoctor GitHub Action |
Summary
chore(theme): button gradient color and add doc.scss
Related Issue
Checklist