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

3xl: ends up in front of xl and 2xl #250

Closed
octref opened this issue Feb 29, 2024 · 2 comments
Closed

3xl: ends up in front of xl and 2xl #250

octref opened this issue Feb 29, 2024 · 2 comments
Labels
question Further information is requested

Comments

@octref
Copy link

octref commented Feb 29, 2024

What version of prettier-plugin-tailwindcss are you using?

v0.5.10

What version of Tailwind CSS are you using?

v3.3.3

What version of Node.js are you using?

For example: v12.0.0

pnpm

For example: npm, Yarn

macOS

For example: macOS, Windows

Reproduction URL

In one TSX file, format the code below:

<div className="3xl:grid-cols-6 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"></div>

Describe your issue

I'm expecting 3xl to be at the end, but it would be formatted to be in the beginning.

@thecrypticace
Copy link
Contributor

Can you share your tailwind config? This looks like you don't have a 3xl breakpoint in your project.

@thecrypticace thecrypticace added the question Further information is requested label Mar 7, 2024
@adamwathan
Copy link
Member

Hey! As @thecrypticace this sounds like a configuration issue, if you check out this Play and hit the "Tidy" button (which uses the Prettier plugin under the hood) you'll see it gets sorted correctly:

https://play.tailwindcss.com/UUvh7PqQQE

My guess is maybe the plugin isn't picking up your Tailwind configuration. Make sure you've specified your config path if it's in a non-guessable location:

https://github.com/tailwindlabs/prettier-plugin-tailwindcss/?tab=readme-ov-file#customizing-your-tailwind-config-path

Going to close this one as we can't reproduce it, but don't hesitate to post a question in our discussion forum if you are still running into issues and need help 👍

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

No branches or pull requests

3 participants