diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-16 18:44:24 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-16 18:44:24 +0100 |
| commit | c074a085cca9d97d9b4eb18f21004fb41f7857f6 (patch) | |
| tree | ffb3a91c7efd8788f58b669991127e08b0e1c034 /static/deck.css | |
| parent | 573ad65a8eee9173256c860f46204e584169c749 (diff) | |
| download | deck-it-c074a085cca9d97d9b4eb18f21004fb41f7857f6.tar.gz deck-it-c074a085cca9d97d9b4eb18f21004fb41f7857f6.zip | |
fix(ui): serve the Propo Nerd Font so icons centre
The plain Inconsolata Nerd Font gives each icon a 500 unit advance while
its ink is up to twice that wide, so every Nerd Font button sat right of
centre. The Propo variant's advance is the ink, so centring works for all
of them; the VM power button's padding workaround goes. The URL becomes
/fonts/nerd-propo.ttf because the font is cached for a day.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static/deck.css')
| -rw-r--r-- | static/deck.css | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/static/deck.css b/static/deck.css index 5ddf0f7..042e6e1 100644 --- a/static/deck.css +++ b/static/deck.css @@ -502,7 +502,7 @@ select { /* Assistant tab. Icons are the Nerd Font glyphs the canvas uses, served by deck-it from the PC; every control is at least 48px for a finger. */ -@font-face { font-family: "deckit-nerd"; src: url("/fonts/nerd.ttf") format("truetype"); font-display: block; } +@font-face { font-family: "deckit-nerd"; src: url("/fonts/nerd-propo.ttf") format("truetype"); font-display: block; } .nf { font-family: "deckit-nerd"; font-style: normal; } .assistant { display: flex; flex-direction: column; height: calc(100dvh - 120px); } @@ -853,10 +853,7 @@ select { .vm-bar { display: flex; align-items: center; gap: 12px; } .vm .ib, .vm-sheet .ib { min-width: 56px; min-height: 56px; font-size: 1.5rem; border-radius: 14px; padding: 0 12px; } .vm-more { margin-left: auto; } -/* The power glyph's ink is 865 units wide on a 500 advance (Nerd Font, not - Mono), so centring the advance leaves it 0.18em right; a right padding of - twice that centres the ink. */ -.vm-power { width: 72px; height: 72px; border-radius: 50%; font-size: 2rem; padding: 0 .36em 0 0; } +.vm-power { width: 72px; height: 72px; border-radius: 50%; font-size: 2rem; padding: 0; } .vm-power.go { background: color-mix(in srgb, var(--udt-green) 30%, transparent); border-color: var(--udt-green); } .vm-sshb.ready { border-color: var(--udt-accent); color: var(--udt-accent); } .vm .hold, .vm-sheet .hold { position: relative; overflow: hidden; isolation: isolate; touch-action: none; } |
