Does Tailwind CSS remove unused custom CSS classes in production?

Rashed Rahat

I have read Tailwind CSS: Optimizing for Production. So far what I have understood that

Tailwind CSS removes unused CSS from your production builds for maximum performance

My question is what about the external CSS files? Are those custom CSS classes will be removed on production?

jmargolisvt

TW does not access your external CSS files. From the docs you linked to:

Removing all unused styles By default, Tailwind will only remove 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 you pull in to your project, like a datepicker library you pull in for example.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Remove unused css classes

Remove unused classes in css

Tailwind CSS not loading custom classes on React app

Tailwind CSS is not outputting classes for the background

Remove unused CSS classes from frameworks like bootstrap in a react project

css module classes not there in production

Custom group "states" in tailwind css

Certain parts of tailwind CSS not working in production

Which has a higher priority, custom utility classes or atomic classes in Tailwind CSS?

Is there any function to remove all of the tailwind css classes remove from NextJs app?

How To Remove unused CSS rules

Add spacing in between items with css tailwind classes

Using Tailwind opacity classes with CSS variables

How in Tailwind CSS to use classes with arbitrary values

Tailwind css purge removes all dark classes

Color classes of Tailwind CSS not working when appended

Tailwind css classes not showing in Storybook build

Tailwind css 3.0.5 classes is not working with react

Does GWT remove unused classes during compilation?

Why does the compiler remove unused structs but not classes

Tailwind CSS: Referencing to custom color in tailwind.config.js

Tailwind css - use className custom spacing value as variable for tailwind config

How remove the horizontal scroll bar in tailwind css?

Importing Custom Fonts Flask and Tailwind CSS

Tailwind CSS custom gradient with React state and FastAverageColor

Why does `hidden` not override `block` when using classes in a Tailwind CSS rule?

Tailwind does not apply custom font family in production build

Angular 8/Sass: Find unused css classes

Tailwind CSS Doesn't Display In Production On Google Cloud Platform