Skip to content

Commit a032709

Browse files
committed
Tweak readme
1 parent 044bd20 commit a032709

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ This plugin follows the Prettier autoloading convention, so once it's installed
1616

1717
## Resolving your Tailwind configuration
1818

19-
By default this plugin will look for a [Tailwind configuration file](https://tailwindcss.com/docs/configuration) (`tailwind.config.js`) in the same directory as your Prettier configuration file.
19+
To ensure that the class sorting is taking into consideration any of your project's Tailwind customizations, it needs access to your [Tailwind configuration file](https://tailwindcss.com/docs/configuration) (`tailwind.config.js`).
2020

21-
If your Tailwind configuration file is somewhere else, you can specify this using the `tailwindConfig` option in your Prettier configuration. Note that paths are resolved relative to the Prettier configuration file.
21+
By default the plugin will look for this file in the same directory as your Prettier configuration file. However, if your Tailwind configuration is somewhere else, you can specify this using the `tailwindConfig` option in your Prettier configuration.
22+
23+
Note that paths are resolved relative to the Prettier configuration file.
2224

2325
```js
2426
// prettier.config.js
@@ -27,10 +29,10 @@ module.exports = {
2729
}
2830
```
2931

30-
If a Tailwind configuration file cannot be found then the default Tailwind configuration will be used.
32+
If a local configuration file cannot be found the plugin will fallback to the default Tailwind configuration.
3133

3234
## Compatibility with other Prettier plugins
3335

34-
To make this plugin work, we had to build it in a way that the Prettier plugin system was not designed for. We had to extend the core parsers in Prettier with our own custom parsers. And while this works, it makes this plugin incompatible with other Prettier plugins that are built the same way. This is a known limitation of Prettier.
36+
To make this plugin work we had to build it in a way that the Prettier plugin system was not originally designed for. We had to extend the core parsers in Prettier with our own custom parsers. And while this totally works, it makes this plugin incompatible with other Prettier plugins that are built the same way.
3537

36-
One example of this incompatibility is with the [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) plugin. It's not possible to use the Svelte plugin at the same time as the Tailwind CSS plugin. However, as a workaround, we bundled the Svelte plugin into this plugin. Simply remove `prettier-plugin-svelte` from your Svelte project when installing the `prettier-plugin-tailwindcss` plugin, and everything should work fine.
38+
One example of this incompatibility is with the [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) plugin. It's not possible to use the Svelte plugin at the same time as the Tailwind CSS plugin. However, as a workaround for this specific situation, we've bundled the Svelte plugin into our plugin. Simply remove `prettier-plugin-svelte` from your Svelte project when installing the `prettier-plugin-tailwindcss` plugin, and everything should continue working.

0 commit comments

Comments
 (0)