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
Safari - Issue with colors and opacity #7887
Comments
Do you get the same problem when you just write regular CSS to do the same thing with no Tailwind at all? I tested on Safari Technology Preview and can't reproduce, but I haven't updated macOS to get 15.4 proper yet. |
@adamwathan In the following video I make some test and I identify that the bug is linked to the use of several property together:
The bug is present with regular CSS in Tailwind CSS context but when I remove completely Tailwind CSS regular CSS works well so it seems to be related with Tailwind CSS. I think next step is to look at Tailwind CSS base and reset 🕵️♂️ Enregistrement.de.l.ecran.2022-03-18.a.15.54.23.movCode use in this video : https://play.tailwindcss.com/6xKNJkzw5Y PS: Removing base fix the issue but I don't know what cause this issue in base. |
Hi, I am able to reproduce the issues mentioned by @florianbouvot. I'm also witnessing some odd issues with When updating macOS to 12.3 I immediately noticed issues with buttons that were using several properties together. I did a few tests, gradually adding more properties and when I have included a playground link here which includes some examples for you: https://play.tailwindcss.com/3tMDZaFJg9. The issues are also present on iOS 15.4 (I imagine iOS 15.4 = Safari 15.4 so it makes sense). Hopefully the information provided helps - thank you in advance. |
This looks like a Safari 15.4 regression. I just tested in 15.3 and it's working fine but in 15.4 it fails. Another thing to note is if you remove the opacity the button background shows up again. I don't see any open webkit bugs for this yet though. |
Reduced test case: <button style="
background-color: red;
border-radius: 0.375rem;
opacity: 0.6;
display: inline-flex;
border-color: transparent;
">
Not working
</button> Remove any one of the properties below background color and the background appears. |
Alright I opened a bug with webkit for this: https://bugs.webkit.org/show_bug.cgi?id=238088 |
Going to close this as unfortunately not anything we can do about it — just a browser bug that affects everyone, regardless of if they are using Tailwind or writing CSS by hand. Hopefully something they will fix soon 🤞 |
We had the same issue with our buttons. |
This issue was resolved in MacOS 12.5 and iOS 15.6 released a few days ago to the public. |
Had a similar bug but it was fixed by adding position: relative; https://stackoverflow.com/questions/73047620/safari-box-shadow-bug |
What version of Tailwind CSS are you using?
v3.0.23
What build tool (or framework if it abstracts the build tool) are you using?
laravel-mix v6.0.43
What version of Node.js are you using?
v17.7.1
What browser are you using?
Safari 15.4
What operating system are you using?
macOS 12.3
Reproduction URL
https://play.tailwindcss.com/UpPKozphrC
Describe your issue
It's may be more a Safari bug than a Tailwind CSS bug.
I create a button with an opacity to 0.9 on hover and button are not visible: every colors (text, bg, ...) seems to switch to black with alpha to 0 on Safari 15.4 (macOS).
The text was updated successfully, but these errors were encountered: