Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scss/_reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion site/src/content/docs/content/reboot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
<input type="text" hidden>
Expand Down