tailwind linter giving me a wrong warning?
how would i go about combining this in tailwind? its giving me the warning of them being the same value but theyre not? negative y translate is not the same as positive x translate or am i tripping (im trying to make it go right and up, which works)
![No description](https://cdn.answeroverflow.com/1141454430533861456/XVwKgUS.png)
6 Replies
Did you try hovering them? It shows what classes they are applying
![No description](https://cdn.answeroverflow.com/1141509684063387869/image.png)
theyre applying the right classes which are 2 different ones
ah, i think the issue might be in the group-hover, its applying group-hover twice
altho im not sure how i would make it to be just "one group-hover" cuz i dont think theres a combined class in tailwind that would translate x+1 and y-1 simultaneously
best answer i can find is something like this https://stackoverflow.com/questions/73623088/tailwindcss-is-there-a-way-to-not-write-multiple-times-the-same-prefix-like but that seems to overcomplicate something that doesnt break my code just gives me a warning
Stack Overflow
TailwindCSS - is there a way to not write multiple times the same p...
The problem:
class="hover:bg-blue-400 hover:-translate-y-2 hover:-translate-x-2 hover:scale-110 hover:shadow-2xl hover:shadow-blue-400 hover:text-white"
here you see, there is the same p...
When I have these kinds of problems I usually just end up writing custom classes
I wouldn't consider it to be a bad practice as I've seen it done around quite a bit