Created
May 13, 2026 09:06
-
-
Save joeldrapper/94ff5661e7c576b23cbe3cf7066e73a2 to your computer and use it in GitHub Desktop.
Tailwind contents utility fix for Safari
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Safari bug: https://bugs.webkit.org/show_bug.cgi?id=301871 | |
| Re-declaring a property forces container query re-evaluation. */ | |
| @utility contents { | |
| display: contents; | |
| --contents-cache-key: 0; | |
| &:has(:hover) { | |
| --contents-cache-key: 0; | |
| } | |
| &:has(:focus) { | |
| --contents-cache-key: 0; | |
| } | |
| &:has(:focus-visible) { | |
| --contents-cache-key: 0; | |
| } | |
| &:has(:focus-within) { | |
| --contents-cache-key: 0; | |
| } | |
| &:has(:active) { | |
| --contents-cache-key: 0; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment