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

extending screens with raw fails max-* screens properties #11698

Closed
yunuli opened this issue Jul 27, 2023 · 3 comments
Closed

extending screens with raw fails max-* screens properties #11698

yunuli opened this issue Jul 27, 2023 · 3 comments

Comments

@yunuli
Copy link

yunuli commented Jul 27, 2023

@RobinMalfait
I've found why max-* fails.
overrides default only cause the missing key fails, like missing 'sm' only make 'max-sm' fails
it is by extending with raw, make all the max-* fails

module.exports = {
  theme: {
    extend: {
      screens: {
        tall: { raw: '(min-height: 800px)' },
        laptop: '1024px',
      },
    },
  },
  plugins: [],
}

Originally posted by @yunuli in #11685 (reply in thread)

@thecrypticace
Copy link
Contributor

Hey! This one is by design. Essentially, we can't handle automatic sorting and cannot handle inversion (to create the max variants) of the media query under these circumstances.

See #9558 (comment) for a list of restrictions on when and how the min/max variants work.

@letehaha
Copy link

@thecrypticace I strongly believe that this kind of info should be described in the official documentation better. I just spent a few hours just to reach your comment. I also asked a bunch of people who actively using Tailwind and no one knew about these restrictions. That means it's not well-known by the common users. Can this #9558 (comment) comment be added as a link to Targeting a breakpoint range section in the documentation? I can open a PR if that makes sense

@Elastoman
Copy link

I agree that this information should be added to the documentation. Took me hours to find out the hard way. Anyhow, keep up the good work and thx!

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

4 participants