tailwindlabs / prettier-plugin-tailwindcss

A Prettier plugin for Tailwind CSS that automatically sorts classes based on our recommended class order.
MIT License
5.61k stars 133 forks source link

Use of `@apply ... #{'!important'}` in `scss` #211

Closed abrahamsaanchez closed 1 year ago

abrahamsaanchez commented 1 year ago

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

v0.5.3

What version of Tailwind CSS are you using?

v3.3.3

What version of Node.js are you using?

v18.16.0

What package manager are you using?

npm

What operating system are you using?

Ubuntu

Reproduction URL

https://github.com/abrahamsaanchez/prettier-plugin-important

Describe your issue

As you can see in the styles.scss file in the provided repo, when the plugin order the class the #{'!important'} go to the first place, breaking the @apply rule. The #{'!important'} should be at the last place.

thecrypticace commented 1 year ago

Hey, I've merged this fix in #212 and gone ahead and published a release to NPM. This is now available as v0.5.4.

Thanks for reporting it!