-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Safari 16.4 crash on <input placeholder>
or text-current
+ opacity
#17194
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
Comments
Edit: It looks like the affected versions may be 16.4 and 16.5. Unfortunately I don't know how to simulate iOS 16.6, Xcode only offers up to 16.4. Given a webpage crash is much more serious than an unsupported style, hopefully it's something you can work around in v4. |
return value === "currentColor" ?
`oklab(from ${value} l a b / ${alpha})`
// or `color(from ${value} srgb r g b / ${alpha})`
: `color-mix(in oklab, ${value} ${alpha}, transparent)`; This approach seems to work around the crash locally with reasonable tradeoffs. |
Thanks for the detailed repro and work you put in. That's really something, huh. My first instinct was to use I've been testing the ![]() You can see this in this repro here too: https://play.tailwindcss.com/WSsSTLHu8h?file=css ![]() It does seem safe to change preflight to |
Unfortunately we have to revert this fix. This does not work in older versions of Chrome and the usage of the relative color features also means it'll require a much newer version of Safari/Firefox/Chrome to work correctly. We're still thinking what the best way to fix this is. @aaronadamsCA Do you remember the exact CSS you had that crashed your site? We're wondering if you used |
@philipp-spiess In our app I had specifically narrowed this down to The only other idea I had was to wrap the style in a |
What version of Tailwind CSS are you using?
v4.0.14
What browser are you using?
iOS Safari 16.4
Reproduction URL
https://play.tailwindcss.com/K2JSaOKDJX
https://play.tailwindcss.com/V9jkBlLwU8
Describe your issue
Both of the examples above crash the webpage in Safari 16.4:
I don't know the full range of affected versions.
The trigger seems to be passing
currentColor
tocolor-mix()
, I found more information about it here:https://stackoverflow.com/questions/76436497/the-color-mix-property-involving-currentcolor-causes-safari-to-crash
My second example above crashes because that exact combo is in
preflight.css
:tailwindcss/packages/tailwindcss/preflight.css
Lines 291 to 294 in 50562a9
Maybe something like
color(from currentColor srgb r g b / 50%)
would work instead.The text was updated successfully, but these errors were encountered: