Plugin system refer to theme color with opacity #15640
-
|
I'd like to define a custom class using the plugin system inside tailwind config. It should apply (among other things) a color from the theme, together with an opacity modifier. I cannot find any documentation how to apply the opacity modifier in this scenario - is this possible? Eg something like this (with the /75 it doesn't work): |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Hi, that is unfortunately not quite correct. I want to change the actual color's opacity as detailed in the below link, not the whole element's opacity. https://tailwindcss.com/docs/text-color#changing-the-opacity |
Beta Was this translation helpful? Give feedback.
-
|
The plugin tailwindcss/src/lib/setupContextUtils.js Lines 277 to 281 in 4f9f603 is a bit different to the CSS version of it: tailwindcss/src/lib/evaluateTailwindFunctions.js Lines 207 to 248 in 4f9f603 The former only lets you request a path, whereas the CSS version allows alpha channel modifier with it. To work around this, you could:
|
Beta Was this translation helpful? Give feedback.
The plugin
theme():tailwindcss/src/lib/setupContextUtils.js
Lines 277 to 281 in 4f9f603
is a bit different to the CSS version of it:
tailwindcss/src/lib/evaluateTailwindFunctions.js
Lines 207 to 248 in 4f9f603