Replies: 1 comment 1 reply
-
You can always do this with your tailwind config |
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.
-
I think Tailwind's built-in responsive screen sizes are good enough for handling most cases. But while I was working on a new site today, I needed to hide a div in screen when the screen width is above 860px. I already had JIT enabled, so I thought maybe I can do something like
[860px]:hidden
instead of adding it in the tailwind config file, and it didn't work. Did some search but I couldn't find anything, so maybe this feature is not in JIT?So my idea is having a class like
[min-w-<size>]:<class>
which can convert to@media (min-width: <size>){...}
, or even[max-w-<size>]:<class>
so it can also handles max-width like@media (max-width: <size>)
, more flexibility.The
@media
rule is big category. Maybe in future version, not just screen width, but also something like orientation or other media rule values. I think it will be great if we can have something like this in future version of Tailwind CSS.Beta Was this translation helpful? Give feedback.
All reactions