Help with getTableRecordClassesUsing
I'm trying to add some conditional classes to my table rows and for some reason I can't get it to work. The classes appear on the table row, and if I use the classes on other elements in the UI it does render properly (so tailwind is compiling it). I've tried a bunch of configurations from the protected method and ultimately stripped it down to as simple a setup as possible, but it does not render the orange border. Is there something I'm missing or doing wrong? Thank you.
17 Replies
Not sure you can have a background on <tr>?!
Border
That's what's in the docs π
Which happens to be what I was looking to do as well. Still, if that's the issue I'll have to come up with something else I guess.
I think it should work, as I did something similar already.
You double checked that your TW classes are included? Can you check in the inspector?
Yeah, I will double check but if I apply the dark:border-orange-300 to the surrounding div of the table in the developer console, it works.
It's there but crossed out
Crossed out means another rule overwrites it, right? Can you share a screenshot?
Agreed. I'll grab a screen shot
border-l-2 is being applied though
Hm, weird. Which rule overrides
border-color
?the divide-gray-700
Use
border-l-orange-600
then.I'll give it a shot
And maybe you need
!border-l-orange-600
Yep, that did the trick. Thank you! Had to use ! as well. I am def not a css guru, but I thought that local classes always took precedence over inherited.
Nope. Only specificity counts.
Ah, that's good to know. Thanks a lot for the help.
There is no such thing as "local" or "inherited"
Looks like I need to hit some NetNinja on youtube lol