Browser support is reduced by using rgb/opacity convention, maybe should favor rgba convention for legacy and modern browsers
See original GitHub issueWhat version of Tailwind CSS are you using?
v3.0.18
What build tool (or framework if it abstracts the build tool) are you using?
Next.js 12.1.0
What version of Node.js are you using?
v12.19.0
What browser are you using?
Safari
What operating system are you using?
iOS
Reproduction URL
Background and font-color using rgb/opacity convention - https://play.tailwindcss.com/l1lAppmgGz?file=config Disabling backgroundOpacity and textOpacity makes it use hex but we lose opacity ability - https://play.tailwindcss.com/K1AcJBUjDP?file=config
Describe your issue
With the *Opacity
core plugins enabled, rgb/opacity
convention is used for colors. Older browser don’t support this format. Please use rgba
convention as that is backwards and forwards compatible.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
RGBa Browser Support | CSS-Tricks
RGBa is a way to declare a color in CSS that includes alpha transparency support. It looks like this:
Read more >"rgba" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Fixing Browser Compatibility Issues With CSS Opacity & RGBA
This is a LambdaTest Experiment on CSS opacity for background color where we will learn how to fix the browser compatibility issues with...
Read more >Replace modern rgba() notation in Tailwind CSS to support ...
Does anyone know a better way to do this? What would be a more elegant way to replace these? I do not make...
Read more >rgba() and hsla() are legacy functions and aliases in modern ...
With rgb() / hsl() accepting transparency values, hsla() and rgba() became legacy functions and are now aliases for rgb() / hsl() . If...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@adamwathan postcss-color-rgb I tried it and it doesn’t work, maybe it’s the reason why postcss 8 is not supported, this library has not been updated for a long time
@Noitidart, try postcss-preset-env https://github.com/csstools/postcss-preset-env https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation
If you use nextjs, delete the .next directory first, and then execute npm run dev to test
The plugin for postcss-preset-env will automatically convert CSS Colors 4 notation to compatible notation:
Hope it helps you
Thank you @flyfinec I was still struggling with this, I will try that out later this week thank you!