1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-04 01:27:20 +00: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

View File

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