Tailwind css is not working on Safari browser #178629
Replies: 4 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
|
The Next.js GitHub issue: “Turbopack Not Compiling Tailwind CSS Changes in Safari” reports Tailwind + Next causing style issues in Safari. Blog on debugging Tailwind CSS with Next.js: “Debugging Tailwind CSS and Next.js” on LogRocket; good for catching config / loading issues. Reddit post: Tailwind v4 causing layout break on Safari (specifically forms input styles); shows browser‑specific quirks. |
Beta Was this translation helpful? Give feedback.
-
Community Experience:
What you should try next:
If you provide your |
Beta Was this translation helpful? Give feedback.
-
|
There are several potential issues and considerations with your Tailwind CSS and Next.js configuration, especially regarding Safari compatibility. Few things to check 😃 1. CSS Variable Usage in Tailwind Config ColorsYou’re using Tailwind custom colors like: border: "hsl(var(--border))",
input: "hsl(var(--input))",
...This means your CSS uses variables (
What to check:
2. Advanced Animation and KeyframesYour config uses custom keyframes and animation: keyframes: { "accordion-down": ... }
animation: { "accordion-down": ... }Potential issue:
3. Minification/PostcssYour plugins: { tailwindcss: {}, autoprefixer: {} }But Safari sometimes mishandles minified files—disable minification or try a production build with full CSS (without minification) to test. 4. Import Paths for Tailwind’s
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Hello everyone,
I recently built a website using Next.js and Tailwind CSS. The site works perfectly across all browsers except Safari 18. When I open it in Safari, many of the layouts appear broken.
I initially suspected an issue with WebKit, but after checking, the code seems fine. When I open the Developer Tools in Safari and navigate to the CSS file in the
_nextdirectory under the “Sources” tab, I noticed something interesting — if I make any change to that CSS file (even just adding an empty line), all the layouts suddenly render correctly.It seems like the styles are not being fully loaded or applied at first.
Has anyone experienced something similar or found a reliable solution?
I’ve been trying to resolve this all afternoon without success, so any insights would be greatly appreciated.
Thank you in advance! 🙏
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions