-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Custom media queries breaks all max-*
modifiers
#1841
Comments
I got the exact same issue: I wanted to add custom vertical media queries to help resize and position decorative elements on phone and tablet screens that switch between portrait and landscape mode. As a result, I can't use For the time being I will resort to re-implementing the default |
Hey! I agree that the previous caveat of raw media queries breaking some of the screen utilities wasn't great. In v4, however, we made the decision to not really recommend that pattern anymore. You are still able to use your old JavaScript config for backward compatibility but going forward we aren't documenting raw breakpoints anymore. Instead, if you want something like this, you can use This also means that the docs are hopefully less confusing in that regard. Thanks for the feedback though and sorry for the long turnaround. We've been really busy getting the v4 release ready and kinda missed responding to some of the GitHub issues during that time. |
Hey Philipp, thanks so much for the reply! Would you consider adding a height-based example to the I used to think I could design everything only based on width breakpoints, but I've discovered for truly mobile-first, app-like experiences, I need to treat height breakpoints as a first-class citizen! |
I meant Should be able to adopt the @custom-variant tall (@media (min-height: 900px));
@custom-variant max-tall (@media (max-height: 900px)); etc. |
Hi there — first off, thanks so much for the Tailwind project.
I recently noticed that all of my
max-sm
breakpoints are broken and I couldn't figure out why. Then I discovered allmax-*
modifiers in my project are broken.Because I'm designing for content (a game) that must fit all on a screen, I added a "tall" screen in my config, as seen in the Custom media queries documentation:
What I couldn't find documented there is that doing so silently breaks all ability to Target a breakpoint range and Target a single breakpoint globally for all screen sizes, including the builtin ones.
To figure this out, I eventually found:
min
andmax
variants tailwindcss#9558 (comment)My suggestion: If the Customizing Screens documentation page could please mention the restrictions listed in that PR, or minimally link to it, it would have saved me a lot of confusion, and accidentally breaking many of my layouts.
Many thanks for your consideration!
The text was updated successfully, but these errors were encountered: