From 9834296722e9576e9ed065894fcf39b39185b8d1 Mon Sep 17 00:00:00 2001 From: Hans de Zwart Date: Tue, 11 Aug 2026 14:48:44 +0200 Subject: [PATCH] Hide the score line and score icon in a one-point match MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A single game has no match to keep score of, so showing "Score: 0 - 0, out of 1" and a sheet to edit it was just clutter. Both are hidden while the match is one point and come back at three or more. `hidden` alone doesn't do it for the button: .btn sets display:grid, and an author rule beats the UA's [hidden] rule whatever the specificity — the same trap behind the original both-icons-showing bug — so .btn[hidden] has to say it explicitly. The markup carries hidden by default too, so the common one-point case can't flash the score before the script runs. The bar returns to its original spacing when the icon goes: the two .75 gaps either side of it merge back into the 1.5 it had before. Co-Authored-By: Claude Opus 5 --- public_html/README.md | 4 ++++ public_html/index.html | 22 +++++++++++++++++++--- public_html/sw.js | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/public_html/README.md b/public_html/README.md index 79bfe7e..06c6be6 100644 --- a/public_html/README.md +++ b/public_html/README.md @@ -68,6 +68,10 @@ Set **Match** in the settings to the number of points you're playing to — 1, 3 5 and up to 29. The time you set is *per point*, so a 5-point match at 2:00 a point puts 10:00 on each clock, and the settings sheet shows you that sum. +At **1 point** there's no match to keep score of, so the score line and the +score-sheet icon both disappear and you get the plain single-game clock. Set +the match to 3 or more and they come back. + The score sheet is the middle icon in the bar. It reads **You** for whoever is holding the phone — the bottom half — and **Them** for the far end, and each panel shows its own score first, so both players read their own score on the diff --git a/public_html/index.html b/public_html/index.html index 9d967ef..61c7b91 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -80,6 +80,7 @@ gap:3px; order:-1; } + .score[hidden]{display:none} .score,.moves{ font-size:clamp(13px,3.7vw,20px); font-weight:700; @@ -158,6 +159,7 @@ .btn[aria-pressed="false"]{color:#5E5954} .btn svg{width:clamp(23px,6.4vw,32px);height:auto;display:block} .btn svg[hidden]{display:none} + .btn[hidden]{display:none} /* .btn's own display would otherwise win */ .btn:focus-visible{outline:2px solid var(--icon-hot);outline-offset:-6px;border-radius:8px} /* reset armed for a second tap — the ring unwinds over the same 2s as the timeout */ @@ -311,7 +313,7 @@
-
Score: 0 - 0, out of 1
+
Moves: 0
@@ -340,7 +342,7 @@ -