0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-04 22:57:34 -04:00

Fix notification count positioning for variable-width elements (#34597)

The notification count is currently positioned using top/left
coordinates from its container's top/left corner. This works fine for
fixed-size containers like the bell icon.

This PR changes the positioning to use bottom/left coordinates from the
container's top/right corner instead. This improvement is needed when
placing notification counts on text that can vary in size due to
different languages or fonts.

The bell and stopwatch should look the same after this change.

---
*Sponsored by Kithara Software GmbH*

Co-authored-by: Marcel Haß <m.hass@kithara.com>
This commit is contained in:
6543 2025-06-05 21:02:07 +02:00 committed by GitHub
parent e5781cec75
commit 9e0e107d23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,8 +129,8 @@
background: var(--color-primary);
border: 2px solid var(--color-nav-bg);
position: absolute;
left: 6px;
top: -9px;
left: calc(100% - 9px);
bottom: calc(100% - 9px);
min-width: 17px;
height: 17px;
border-radius: 11px; /* (height + 2 * borderThickness) / 2 */