From e63dba38aae437b711acc403eae3356b0d27b8ae Mon Sep 17 00:00:00 2001 From: Doyle Fermi Date: Thu, 20 Aug 2026 14:53:43 +0530 Subject: [PATCH] fix(site): hide the secondary download button on non-Linux visitors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It rendered as an empty 55x31 box for everyone on Mac and Windows. The `hidden` attribute hides an element through a UA-stylesheet `display: none`, which any author rule that sets `display` silently beats. `.btn` sets `display: inline-flex`, so `hidden` did nothing to it. The `#dl-others` paragraph next to it hides correctly only because `.dl-meta` happens never to set `display` — which is why this was not caught by testing the neighbouring element. Fixed with a global `[hidden] { display: none !important; }` rather than a targeted `.btn[hidden]`: the next element given `hidden` will hit this the moment it also has a `display`, and that is not a bug worth finding twice. Verified both states in a browser: hidden collapses to 0x0 with `display: none`, and unhidden still renders as a full 304x58 button, so the Linux path is unaffected. --- site/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/site/index.html b/site/index.html index 142ccfc..cbf31db 100644 --- a/site/index.html +++ b/site/index.html @@ -36,6 +36,16 @@ } } * { box-sizing: border-box; } + /* + * The `hidden` attribute only hides an element via a UA-stylesheet `display: none`, which any + * author rule setting `display` silently beats. `.btn` sets `display: inline-flex`, so a + * hidden button stayed on the page as an empty 55x31 box for every non-Linux visitor. + * + * Declared once, globally, rather than as `.btn[hidden]`: the next element given `hidden` will + * have the same problem the moment it also has a `display`, and that is not a bug worth + * discovering twice. + */ + [hidden] { display: none !important; } html { scroll-behavior: smooth; } body { margin: 0;