From ed7ff83f20f265159750c3e239554cb03a254060 Mon Sep 17 00:00:00 2001 From: chefarbeiter Date: Mon, 19 Jan 2026 19:07:21 +0100 Subject: [PATCH] Allow hidden="until-found" --- scss/_reboot.scss | 4 ++-- site/src/content/docs/content/reboot.mdx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scss/_reboot.scss b/scss/_reboot.scss index 524645fb02fc..a1250064e603 100644 --- a/scss/_reboot.scss +++ b/scss/_reboot.scss @@ -610,8 +610,8 @@ progress { // Hidden attribute // -// Always hide an element with the `hidden` HTML attribute. +// Always hide an element with the `hidden` HTML attribute, unless until-found is used. -[hidden] { +[hidden]:not([hidden="until-found"]) { display: none !important; } diff --git a/site/src/content/docs/content/reboot.mdx b/site/src/content/docs/content/reboot.mdx index 642638ffbe35..1bfe9189cfe3 100644 --- a/site/src/content/docs/content/reboot.mdx +++ b/site/src/content/docs/content/reboot.mdx @@ -430,7 +430,7 @@ The default `cursor` on summary is `text`, so we reset that to `pointer` to conv ## HTML5 `[hidden]` attribute -HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden), which is styled as `display: none` by default. Borrowing an idea from [PureCSS](https://purecss.io/), we improve upon this default by making `[hidden] { display: none !important; }` to help prevent its `display` from getting accidentally overridden. +HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden), which is styled as `display: none` by default. Borrowing an idea from [PureCSS](https://purecss.io/), we improve upon this default by making `[hidden]:not([hidden="until-found"]) { display: none !important; }` to help prevent its `display` from getting accidentally overridden. ```html