Skip to content

Add details about hidden attribute preflight rules #2321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Aug 1, 2025

In v4 we made a change that makes elements with a hidden attribute display: none !important. A consequence of this is that <div hidden class="block">test</div> will be invisible in v4 where it was visible in v3.

The intent is that you must remove this attribute if the element isn't actually meant to be hidden but we didn't document this in the upgrade guide or the preflight page.

Closes tailwindlabs/tailwindcss#18653

Copy link

vercel bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 1:45pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v4 preflight adds !important on [hidden] attribute, unexpectedly preventing override
1 participant