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

reordering doesn't respect backets when there is a space #260

Closed
fcrozatier opened this issue Apr 9, 2024 · 2 comments
Closed

reordering doesn't respect backets when there is a space #260

fcrozatier opened this issue Apr 9, 2024 · 2 comments

Comments

@fcrozatier
Copy link

See the following video, where

<span class="before:sr-only before:content-['hello there'] bg-green-100"></span>

is formatted as

<span class="there'] bg-green-100 before:sr-only before:content-['hello"></span>
Enregistrement.de.l.ecran.2024-04-09.a.11.10.35.mov

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

"prettier-plugin-tailwindcss": "^0.5.13",

What version of Tailwind CSS are you using?

"tailwindcss": "4.0.0-alpha.13"

What version of Node.js are you using?

v20.11.0

What package manager are you using?

pnpm

What operating system are you using?

macOS

@RobinMalfait
Copy link
Contributor

Hey!

This is a limitation to how classes work in HTML, you can't have spaces because each space is a delimiter for a new class. If you want to use spaces, you can use an _ which we replace with a space.

More info: https://tailwindcss.com/docs/content#using-spaces-and-underscores

Hope this helps!

@fcrozatier
Copy link
Author

Oh thank you!

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