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
RGB generated for local builds, but HSLA on production — causing a noticeable colour difference #11716
Comments
Hey! Please provide a reproduction, Tailwind itself isn’t doing this so it’s particular to your project. A reproduction would be a GitHub project that included a script to do a development build where the issue is not present and another script to create a production build that does demonstrate the issue. My guess is something in the production pipeline that’s trying to either minify or transpile the CSS to support older browsers. |
Opened an issue on Next.js to disabled the For anyone in an environment where they have the ability to configure cssnano directly, you should turn off
Going to close this one as not a Tailwind bug for now, hopefully the Next.js PR will be merged and this won't be an issue in Next.js projects anymore 👍 |
I've opened an issue on cssnano as well in case they'd like to make some changes around this upstream, but since they are looking for new maintainers on that package it might be something anyone can easily prioritize right now and might not happen very quickly: |
What version of Tailwind CSS are you using?
v3.3.3
What build tool (or framework if it abstracts the build tool) are you using?
Next.js 13.4.12
What version of Node.js are you using?
v16.13.2
What browser are you using?
Chrome
What operating system are you using?
Windows
Reproduction URL
I cannot provide a reproduction URL as the issue pertains to a difference in output between local and production builds.
Describe your issue
When using a class such as
bg-neutral-50/50
, the output CSS in a local build isbackground-color: rgb(23 23 23 / 0.5);
, however, on a production build, the output isbackground-color: hsla(0,0%,9%,.5);
which results in a noticeable difference in colour. See the example screenshots below, first is local, second is production:The text was updated successfully, but these errors were encountered: