-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix(styles): improve hover visibility for right-sidebar links in dark & light mode (#7894) #7935
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
base: main
Are you sure you want to change the base?
fix(styles): improve hover visibility for right-sidebar links in dark & light mode (#7894) #7935
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Pull Request Overview
This PR enhances hover styling for links in the right-sidebar MetaBar by adding smooth transitions and stronger color contrast in both light and dark modes.
- Introduce
transition-colors
andduration-200
for link hover transitions. - Change hover text color from
text-neutral-800/dark:text-neutral-200
totext-neutral-700/dark:text-neutral-600
. - Extend the same base and hover styles to nested list item links (
li > a
).
Comments suppressed due to low confidence (2)
packages/ui-components/Containers/MetaBar/index.module.css:54
- [nitpick] Consider adding a visual regression or unit test to cover the new hover transition and color changes, ensuring these styles remain consistent in future updates.
transition-colors
packages/ui-components/Containers/MetaBar/index.module.css:59
- Please verify that
text-neutral-700
on a white background meets WCAG AA contrast guidelines; you may need a darker shade to ensure sufficient hover visibility for all users.
@apply text-neutral-700
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.
I really don't think 20 lines of code need to change for this, can't we simply update the 1-2 lines that do the previous hover with better contrast?
Hi @avivkeller,
Changes Made on Hover Style:updated-hover-right.mp4 |
can we use shade of grey instead of green ? green is too contrasted |
I'm okay with either, but @Mohit5Upadhyay remember to |
Hi @avivkeller and @AugustinMauroy , I’ve updated the hover color to greyish shade instead of green:
This provides a subtle yet visible contrast in both light and dark modes and avoids the green, which was too strong, as per your suggestion. After Change:grayish-hover-right-sidebar.mp4
Thanks again for the guidance! |
Thanks for pointing out the unrelated changes. I’ve reverted those and kept only the hover functionality. Pushed the changes. Let me know if this looks good! |
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.
LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #7935 +/- ##
==========================================
+ Coverage 75.42% 75.43% +0.01%
==========================================
Files 96 96
Lines 8354 8354
Branches 219 219
==========================================
+ Hits 6301 6302 +1
+ Misses 2051 2050 -1
Partials 2 2 ☔ View full report in Codecov by Sentry. |
Description
This PR improves the hover state styling for links in the site's right sidebar.
Previously, the color difference between normal and hover states was too subtle, especially in
dark mode
, making it difficult for users to see when a link was being hovered. This created apoor user experience and reduced accessibility
.Validation
Current Situation
current-right-sidebar.mp4
Expected Situation
right-sidebar-hover-resolve.mp4
Related Issues
Fixes #7894
Check List
pnpm format
to ensure the code follows the style guide.pnpm test
to check if all tests are passing.pnpm build
to check if the website builds without errors.