[Documentation] Utilize color-mix() to allow arbitrary color CSS variables with opacity #12090
mordechaim
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
According to the documentation you must only set the color channels for color CSS variables in order for
<alpha-value>
to properly work.Well, with
color-mix()
now supported by all major browsers there's a nice way to add opacity to any color:This is based on this blog. I've tested it and it works properly.
I think it'll be helpful to include it in the documentation.
Beta Was this translation helpful? Give feedback.
All reactions