Replies: 2 comments 2 replies
-
This is actually already available in Tailwind – replace |
Beta Was this translation helpful? Give feedback.
1 reply
-
sorry guys I don't know about Tailwind documentation and link which you shared is not working on clicking message displayed invalid URL. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
For easier theming, we're defining custom colours using CSS variables, so we're using the recommended approach e.g.
However, we've now reached a situation where we'd like one of the colours to have an alpha channel set. Obviously we can define it as just
"var(--color-slightly-transparent)", but then AFAICT it isn't possible to override that default value the standard Tailwind way e.g.
bg-slighty-transparent/0`. A use-case for this would be for changing the opacity as part of a transition.A potential syntax I made up without much thought would be:
For extra credit, any arbitrary value could be used there, e.g.
rgb(var(--my-color) / <alpha-channel:var(--my-color-alpha))
.(Note that I don't actually have a need for this yet, but I wanted to bring it to the Tailwind team's attention in case it's something that would be easy to implement)
Beta Was this translation helpful? Give feedback.
All reactions