From 3ceec49229cbc2a67f7616fc2a5b9a606a011236 Mon Sep 17 00:00:00 2001 From: k3n Date: Tue, 17 Nov 2026 18:41:39 +0000 Subject: [PATCH] fix(ui): center notification badge count and normalize dimensions (#40400) Fixes #33479 The notification count, stopwatch dot, and navbar admin badge appeared vertically sunken / uncentered on high-DPI displays (such as 1440p) and across varying browser zoom levels. This was caused by: 1. Fractional horizontal padding (3.75px) and odd height (17px with 2px borders = 13px content height), causing subpixel rounding splits during flexbox alignment. 2. A fixed line-height (12px) which offset the baseline of un-descended numerals within the flex container. This change: - Updates height and min-width to 18px (14px inner content box) for clean integer alignment. - Sets line-height to 1 for tight font bounding box centering. - Normalizes horizontal padding to 4px. - Adjusts font-size to 11px to preserve comfortable spacing inside the badge. - Replaces hardcoded border-radius with var(--border-radius-full). Signed-off-by: Francesco Passaquindici Signed-off-by: Francesco Passaquindici --- web_src/css/modules/navbar.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web_src/css/modules/navbar.css b/web_src/css/modules/navbar.css index 6777743ba32..9f028d04bc7 100644 --- a/web_src/css/modules/navbar.css +++ b/web_src/css/modules/navbar.css @@ -86,18 +86,18 @@ #navbar .header-stopwatch-dot, #navbar .navbar-admin-badge { color: var(--color-nav-bg); - padding: 0 3.75px; - font-size: 12px; - line-height: 12px; + padding: 0 4px; + font-size: 11px; + line-height: 1; font-weight: var(--font-weight-bold); background: var(--color-primary); border: 2px solid var(--color-nav-bg); position: absolute; left: calc(100% - 9px); bottom: calc(100% - 9px); - min-width: 17px; - height: 17px; - border-radius: 11px; /* (height + 2 * borderThickness) / 2 */ + min-width: 18px; + height: 18px; + border-radius: var(--border-radius-full); display: flex; align-items: center; justify-content: center;