I like this approach as well. So, when we use JIT mode, it still purges unused styles, and we have the same output as we were directly using utility classes in JSX right?
The answer is No, By default, Tailwind only removes unused classes that it generates itself, or has been explicitly wrapped in a @layer directive. It will not remove unused styles from third-party CSS.
I like this approach as well. So, when we use JIT mode, it still purges unused styles, and we have the same output as we were directly using utility classes in JSX right?
The answer is No, By default, Tailwind only removes unused classes that it generates itself, or has been explicitly wrapped in a
@layer
directive. It will not remove unused styles from third-party CSS.It's correct 💪