Skip to content

Ring opacity not working with tailwind custom color #14947

Answered by wongjn
iamyahia asked this question in Help
Discussion options

You must be logged in to vote

In the ring-opacity-* case:

Tailwind doesn't "know" what your CSS variable value is and thus has trouble injecting the opacity modifer in properly. It seems you'd need to explicitly set the <alpha-value> token in the colors: https://play.tailwindcss.com/TdpRvQbdpN?file=config.

In the /<opacity> case:

When you use the hsl() function, Tailwind seems to assume you are using modern hsl() syntax. However, in the CSS, the variables are declared with legacy syntax. So, you could do one of:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iamyahia
Comment options

Answer selected by iamyahia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants