[UI/UX:Developer] Add hover effect to sidebar navigation items#747
[UI/UX:Developer] Add hover effect to sidebar navigation items#747janhavitupe wants to merge 1 commit intoSubmitty:mainfrom
Conversation
|
Hi, I reviewed the changes, and the hover effect improves the sidebar interaction nicely. I have a small suggestion: adding a smooth transition (e.g., transition: background-color 0.2s ease) could make the hover effect feel more polished. Also, has the hover color contrast been checked for accessibility in both light and dark modes? Thanks! |
|
@shraddhaKodes Thanks for the suggestions! The smooth transition is already handled globally via the rule in _dark-mode.scss: I also checked the hover color contrast in both light and dark modes, and it meets requirements, so that should be covered. Let me know if you'd still prefer an explicit transition or any adjustments! |
|
Thanks for the clarification! That makes sense, especially keeping transitions consistent globally. Glad to know accessibility has been considered as well. Looks good to me 👍 |
Add a hover background color to sidebar navigation items in the nav tree to provide visual feedback when hovering over non-active items.
The hover color (
#eef6fblight /#3a3d42dark) is intentionally lighter than the selected state color to maintain visual hierarchy between hovered and active items. Both light and dark themes are supported via CSS custom properties (--nav-hover) defined in_colors.scss, consistent with how the existing--nav-selectedtoken works.Changes:
navtree.css: added#nav-tree .item:not(.selected):hoverrule usingvar(--nav-hover)_sass/_colors.scss: added--nav-hovertoken for light and dark themes_sass/_dark-mode.scss: added hover rule with!importantto overridenavtree.cssin dark modeCloses #12662 in https://github.com/Submitty/Submitty repository.