Skip to content

Commit

Permalink
Don't set display: none on elements that use hidden="until-found" (
Browse files Browse the repository at this point in the history
…#14625)

Fixes an issue reported by the React Aria Components team here:

adobe/react-spectrum#7160

Basically `hidden="until-found"` behaves very differently than `hidden`
and doesn't actually use `display: none`, so we don't want to apply the
behavior we apply for the regular `hidden` attribute.

---------

Co-authored-by: Robin Malfait <[email protected]>
  • Loading branch information
adamwathan and RobinMalfait authored Oct 9, 2024
1 parent ed3c535 commit b570e2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Don't set `display: none` on elements that use `hidden="until-found"` ([#14625](https://github.com/tailwindlabs/tailwindcss/pull/14625))

## [3.4.13] - 2024-09-23

Expand Down
2 changes: 1 addition & 1 deletion src/css/preflight.css
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,6 @@ video {
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden] {
[hidden]:where(:not([hidden="until-found"])) {
display: none;
}

0 comments on commit b570e2b

Please sign in to comment.