From 131346a7c77c1dec84c12b4ab352dca650e722e0 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Wed, 15 Jul 2026 09:48:03 +0000 Subject: [PATCH] Hide dialog weight/grams fields on event types that don't use them The JS already sets .hidden per type, but 'dialog label { display: block }' outranks the UA [hidden] rule, so the fields rendered anyway. Add the explicit [hidden] override, matching the pattern used elsewhere in the file. --- src/changelog.json | 1 + src/style.css | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/changelog.json b/src/changelog.json index 9d018ed..17078e5 100644 --- a/src/changelog.json +++ b/src/changelog.json @@ -1,4 +1,5 @@ [ + { "date": "2026-07-15", "text": "Weight and amount fields no longer show up on events that don't use them (e.g. editing a pee)" }, { "date": "2026-07-15", "text": "The date in the top bar is shorter (no year), so the whole bar fits on smaller iPhones" }, { "date": "2026-07-13", "text": "The big timer is back at the top — scroll past it and it hops into the frozen bar instead" }, { "date": "2026-07-13", "text": "The top bar fits on one row: timer, day arrows, date picker and Today" }, diff --git a/src/style.css b/src/style.css index 620faea..f5a3780 100644 --- a/src/style.css +++ b/src/style.css @@ -466,6 +466,9 @@ dialog::backdrop { background: rgba(0,0,0,0.4); } dialog h3 { margin: 0 0 12px; } dialog label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; } +/* The display rule above beats the UA [hidden] rule, so hide explicitly — + otherwise the weight/grams fields show on event types that don't use them. */ +dialog label[hidden] { display: none; } dialog label input, dialog label textarea { margin-top: 4px; } dialog menu {