fix(web): prevent focus outlines from being clipped in sidebars#26412
Open
slegarraga wants to merge 1 commit intoimmich-app:mainfrom
Open
fix(web): prevent focus outlines from being clipped in sidebars#26412slegarraga wants to merge 1 commit intoimmich-app:mainfrom
slegarraga wants to merge 1 commit intoimmich-app:mainfrom
Conversation
Add start padding (ps-1) to sidebar content wrappers so that focus-visible outlines on NavbarItem links are not clipped by the parent container's overflow. The NavbarItem component renders links with rounded-e-full styling that sit flush against the left edge of the scrollable sidebar. When focused, the browser's outline extends outside the element boundary and gets clipped by the overflow-auto on the sidebar's scroll container. Adding 4px of start padding provides space for the outline to render fully. Applied to both the admin sidebar (AdminPageLayout) and the user sidebar (sidebar.svelte) for consistency. Fixes immich-app#19498
|
Label error. Requires exactly 1 of: changelog:.*. Found: 🖥️web. A maintainer will add the required label. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using Tab to navigate through sidebar items, focus outlines appear clipped/broken because the sidebar's scrollable container (
overflow-auto) clips CSS outlines that extend outside element boundaries.Fixes #19498
Root Cause
The
NavbarItemcomponent (from@immich/ui) renders anchor elements withrounded-e-fullstyling that sit flush against the left edge of the scrollable sidebar container. When focused, the outline extends outside the element's box and gets clipped by the parent'soverflow: auto.Solution
Add
ps-1(4px start padding) to the sidebar content wrappers in both:AdminPageLayout.svelte— the admin sidebarsidebar.svelte— the user sidebarThis provides just enough space for the 2px outline + 2px offset to render fully without being clipped by the overflow container.
Changes
web/src/lib/components/layouts/AdminPageLayout.svelte— addedps-1to nav items wrapperweb/src/lib/components/sidebar/sidebar.svelte— addedps-1to content wrapper