Replies: 3 comments 2 replies
-
|
In the developer tools we can see that what's generated is something like below: .bg-white {
--tw-bg-opacity: 1;
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
}It means that for opacity you already have a value but it's set directly to1 in this case. I've also run into this from time to time, wanting to just get a color by its name. For me it's edge cases like when I test something with inline style or using arbitrary values. I hope they find a solution for it in the future. |
Beta Was this translation helpful? Give feedback.
-
|
Hey ! {
theme: {
colors: {
white: 'var(--color-white)',
primary: {
50: 'var(--color-primary-50)',
// ...
},
},
},
}/* Some CSS somewhere */
:root {
--color-white: #fff;
--color-primary-50: #123456;
}You may be inspired by this solution or you might find it useful to use a plugin like this one. Side note: In the future I'd advise you to be a bit more detailed and explicit as to what your issue is, what you need help with, and how can anyone help you. Also, try to be a bit less We, developers, deserve aka entitled. Hope it helps. |
Beta Was this translation helpful? Give feedback.
-
|
@bluefirepro c'mon now, let's stay nice :) Your idea is great, I have upvoted it! It would entirely remove the need to write custom theme extensions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
This feature 100% needed right now.
Please upvote. We, developers, deserve full-featured tools.
Beta Was this translation helpful? Give feedback.
All reactions