Replies: 2 comments 1 reply
-
Okay, one workaround is to export { 'text-bluegray-color font-bold': disabledValues.includes(value) } Not the best way but better than nothing. Maybe vue3 dynamic style variables could help too. 🤔 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Problem is that when it's disabled and not selected, you are adding two colors:
So those are conflicting. You need to make sure only one color class is ever added at a time by reworking the conditional logic to always check all states. |
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.
-
Hi ! 👋🏻
Not sure if that question was already asked but I really don't know how to phrase that one so here is my question. ^^
I'm using a Nuxt app w/ the module
@nuxtjs/tailwindcss
, working perfectly so far !I do have this kind of setup
Pulling colors from an SCSS file
Then, I do have some conditionnal logic for specific colors in some of my components.
It's looking like this
So, basically the text inside of the
span
should be:primary-500
if it's selecteddark-500
if it is not selectedbluegray-500
if it's disabled (whatever if it's selected or not)I thought at first that it was defined somewhere else at first but it doesn't.
Tried to invert the 2 lines inside of my array in
:class
, nope.Then, I tried with something like
text-primary-500
(to replacetext-bluegray-500
) and it was overridingtext-dark-500
since it's defined below the other 2 colors. Tried to change the order of the.scss
file but soon realized that it was depending oftailwind.config.js
's color ordering.I was wondering if I was doing something wrong. I guess that this is how it's supposed to work ?
Also, is there a non ugly solution to help overriding this ?
PS: saw #1446, but it did not helped me much. 😓
Beta Was this translation helpful? Give feedback.
All reactions