Color Opacity Modifier: Adding Support For Older Browsers #2986
mariodukoskiinfinum
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello 👋
In the project I'm working on, we're using the color opacity modifier feature in Panda CSS. However, we also need to support older browsers. While I know I can opt-out and define colors with opacity directly in the colors object, I was wondering if it would make sense for Panda CSS to handle this out of the box.
Specifically, rather than using variables in the color-mix function, could Panda CSS fall back to using raw color values?
For example:
By using raw color values, the PostCSS plugin for color-mix can process and resolve the mix, making it compatible with older browsers. Currently, this plugin doesn't support resolving variables, and it’s unclear if it ever will.
Example of My Setup
Theme Contract:
Color-Mix Transform:
Utility Config Example (Background):
Questions:
Thank you for your time and input!
Beta Was this translation helpful? Give feedback.
All reactions