-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[v4] Background gradient does not display (generated css has syntax error) #16037
Comments
I would like to work on this issue if no one has started yet? |
@RobinMalfait Could you please share with me the contributing documentation? I can't seem to make sense of how to contribute and start-up the project locally |
Hey! The generated CSS works as expected to me (if you just run If you look at the final computed CSS, you will see this: linear-gradient(to right, oklch(0.623 0.214 259.815) 0%, oklch(0.723 0.219 149.579) 100%) You can compute this yourself using You can also see that behavior in Tailwind Play: https://play.tailwindcss.com/p4BqoBeUwQ That said, the moment you run Prettier on the generated file, the This is because the The reason it's encoded in the If we encode the I'm also assuming that you created this as a minimal reproduction repo (which is good) but the default behavior works as expected. Are you using any other tools in your build pipeline by any chance? It could be that other minifiers are at work here that also get rid of the trailing All that said, we opened a PR to improve this behavior to workaround the linked Prettier bug. Essentially we now moved the Linked PR: #16072 |
Hey! Quick update, we merged a fix as part of #16072 which will be available in the next release. You can already try it using the insiders build if you want
|
@RobinMalfait that was insanely fast, tysm! (Yes I was still running prettier in IDE) |
What version of Tailwind CSS are you using?
v4.0.1
What build tool (or framework if it abstracts the build tool) are you using?
postcss-cli 11.0.0, postcss 8.5.1
What version of Node.js are you using?
v22.12.0
What browser are you using?
Chrome & Safari (same issue)
What operating system are you using?
macOS
Reproduction URL
https://github.com/oliverlambson/tailwind-gradient
Describe your issue
When using background gradients, the generated css contains a syntax error that causes the gradient to not display.
Actual output (css formatted for clarity):
Correct output:
The text was updated successfully, but these errors were encountered: