From 331213048303b6f6d42784c000f12401fef74a6b Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Wed, 3 Jun 2026 14:56:19 +0200 Subject: [PATCH] Stage 7 polish (round 2b): tab-bar spacing + hint badge on icon corner (items 2,3) --- ui/src/components/TabBar.svelte | 14 ++++++++------ ui/src/game/Game.svelte | 13 ++++++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ui/src/components/TabBar.svelte b/ui/src/components/TabBar.svelte index 4810ae9..9865762 100644 --- a/ui/src/components/TabBar.svelte +++ b/ui/src/components/TabBar.svelte @@ -26,10 +26,10 @@ display: flex; flex-direction: column; align-items: center; - gap: 2px; + gap: 0; background: none; border: none; - padding: 2px 0; + padding: 1px 0; color: var(--text); width: 100%; user-select: none; @@ -38,13 +38,15 @@ :global(.tab:disabled) { opacity: 0.4; } + /* The icon square hugs the emoji (just a little padding) so it is the press-highlight + target and the badge can sit on its corner. */ :global(.tab .sq) { - width: 48px; - height: 40px; - display: grid; + position: relative; + display: inline-grid; place-items: center; + padding: 3px 10px; border-radius: 12px; - font-size: 1.5rem; + font-size: 1.75rem; line-height: 1; transition: background-color 0.12s; } diff --git a/ui/src/game/Game.svelte b/ui/src/game/Game.svelte index 6926893..f128732 100644 --- a/ui/src/game/Game.svelte +++ b/ui/src/game/Game.svelte @@ -693,14 +693,17 @@ } .badge { position: absolute; - top: 0; - right: 4px; - font-size: 0.6rem; + top: -3px; + right: -3px; + font-size: 0.68rem; + font-weight: 700; background: var(--accent); color: var(--accent-text); border-radius: 999px; - padding: 0 4px; - line-height: 1.3; + min-width: 15px; + padding: 0 3px; + line-height: 1.4; + text-align: center; } .loading { text-align: center;