Skip to content
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

max-breakpoint:class not working when raw screen setup present in tailwind config #14429

Closed
SebastianMarzecCodewise opened this issue Sep 16, 2024 · 1 comment

Comments

@SebastianMarzecCodewise

What version of Tailwind CSS are you using?

v3.4.10

Reproduction URL

https://play.tailwindcss.com/rHaI81WQuv

Describe your issue

In example above class max-lg:hidden is not working, but of course none of max:breakpoint classes works when I have custom media-query with raw setup in tailwind config.
If you'll remove this line (in tailwind play/config):
'shortdesktop': { 'raw': '(max-height: 950px) and (min-width: 768px)' },
it works again

@adamwathan
Copy link
Member

Hey! This is by design at the moment — it's critical that all breakpoint variants are sorted in a particular order and when you introduce complex custom breakpoints that becomes sort of impossible for us to do intelligently, so we don't support the max-* or min-* variants when you've customized your config in that way:

#9558 (comment)

Hope that helps! We should probably mention this in the documentation because it comes up often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants