From f61ef385b9543750da6ffbfad8a0e173ef84556b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 20:06:36 +0100 Subject: fix(dashboard): centre the action icons by their measured ink A fixed 1em box overshot the other way. Each glyph is measured with canvas measureText once the font is loaded, and shifted by half the gap between its drawn width and its advance. Co-Authored-By: Claude Opus 5.5 --- static/deck.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'static/deck.css') diff --git a/static/deck.css b/static/deck.css index b0608e1..0977279 100644 --- a/static/deck.css +++ b/static/deck.css @@ -727,9 +727,9 @@ select { .dash-acts button { position: relative; display: grid; place-items: center; padding: 0; height: 100%; max-height: 64px; aspect-ratio: 1; border-radius: 16px; font-size: 1.7rem; line-height: 1; background: var(--udt-surface0); border: 0; color: var(--udt-text); } .dash-acts button.fail { color: var(--udt-red); } -/* The Nerd Font glyphs draw past their advance; a 1em box drawn from its left - edge centres what is drawn, not the advance. */ -.dash-acts button i { display: block; width: 1em; height: 1em; line-height: 1; text-align: left; font-style: normal; } +/* The Nerd Font glyphs draw past their advance: dashboard.js shifts each by + the gap between its ink and its advance (inkShift). */ +.dash-acts button i { display: block; line-height: 1; font-style: normal; } /* The same rotating three-hue gradient Hyprland draws on window borders, read from ~/.cache/udt/udt-border.lua via /theme.css. */ .dash-acts button::before { -- cgit v1.2.3