Custom media query rules not working in v4 #18390
Unanswered
charlesganza
asked this question in
Help
Replies: 1 comment 2 replies
-
Consider providing a git repo that reproduces the issue and we can take a look for you. |
Beta Was this translation helpful? Give feedback.
2 replies
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'm facing an issue with v4 where custom media query rules are not having any effect.
In v3, in
tailwind.config.ts
inside the theme block I used the below code which worked perfectly for my needs.and since
tailwind.config.ts
has been removed, how can I include those rules in v4?Here's what I've tried so far to no avail.
In my app.css, I've included:
But whenever I use it, there's no effect. This has broken my site and I'd appreciate a guide on how to get this to work. Tailwind provided breakpoints don't work either. I even tried wrapping my content into @container, but it didn't work either.
For example, this div below is supposed to display 3 columns on big screens, 2 on tablets and 1 on mobile. That isn't working.
<div class="grid grid-cols-3 mobile:grid-cols-1 tablet:grid-cols-2 not-mobile:gap-4">
Any help will be appreciated as this has broken my whole site.
Beta Was this translation helpful? Give feedback.
All reactions