mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 02:17:25 +02:00
fix(ui): round the album grid hover overlay in the Nautiline theme (#6115)
The theme rounded the cover image directly and set a border radius on albumContainer, which has no background or clipping, so it rounded nothing. The hover overlay is a sibling of the image inside the same link, so it kept square corners that poked out over the rounded cover. Move the radius to that link and clip it, so both the image and the overlay follow the same rounded box. This also covers the mobile bar, which is always visible. Fixes #6110
This commit is contained in:
parent
043de7a86c
commit
fe1c87c190
2 changed files with 24 additions and 4 deletions
|
|
@ -598,11 +598,9 @@ const NautilineTheme = {
|
|||
},
|
||||
},
|
||||
NDAlbumGridView: {
|
||||
albumContainer: {
|
||||
link: {
|
||||
borderRadius: radii.md,
|
||||
'& img': {
|
||||
borderRadius: radii.md,
|
||||
},
|
||||
overflow: 'hidden',
|
||||
},
|
||||
albumTitle: {
|
||||
fontWeight: 600,
|
||||
|
|
|
|||
|
|
@ -12,3 +12,25 @@ describe('NDPlaylistDetails styles', () => {
|
|||
},
|
||||
)
|
||||
})
|
||||
|
||||
describe('NDAlbumGridView styles', () => {
|
||||
const themeEntries = Object.entries(themes)
|
||||
|
||||
// The hover overlay is a sibling of the image, so it keeps square corners.
|
||||
it.each(themeEntries)(
|
||||
'%s should not round the grid cover image on its own',
|
||||
(themeName, theme) => {
|
||||
const container = theme.overrides?.NDAlbumGridView?.albumContainer
|
||||
expect(container?.['& img']?.borderRadius).toBeUndefined()
|
||||
},
|
||||
)
|
||||
|
||||
it.each(themeEntries)(
|
||||
'%s should clip the grid cover link when it is rounded',
|
||||
(themeName, theme) => {
|
||||
const link = theme.overrides?.NDAlbumGridView?.link
|
||||
if (!link?.borderRadius) return
|
||||
expect(link.overflow).toBe('hidden')
|
||||
},
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue