Make Tailwind Desktop First
I have set my tailwind configuration to be desktop first:
But the problem is that tailwind generates the ouput from smaller screens first to larger. Making Larger screens overwrite smaller ones, which defeats the purpose.
Has anyone ever tried making tailwind generate large screen first? Thank you.
5 Replies
In my situation, I cannot overwrite an lg:text-4xl with sm:text-xl which is a desktop approach of doing it.
Is it impossible to do desktop first approach in tailwind?
I've never tried
but why do you want to convert it into desktop first?
Because I'm doing a desktop-first approach now, client want to see the desktop first, so I approached it that way.
I usually just treat it as if it was deskltop first, and then when I do mobile I just change classes to lg:thing
before
relative
after lg:relative absolute
hmmm
maybe I can do that
It's kinda a harder solution, but I think it can work.
Ohhh.
I think your solution works and it follow tailwind approach, silly me
This really helped me, thank you. I wish I had asked earlier before wasting hours lol