Skip to content

Is there option for Tailwind CLI to not include Preflight styles V4 #17324

Answered by wongjn
szymboro asked this question in Help
Discussion options

You must be logged in to vote

As per the documentation:

If you'd like to completely disable Preflight—perhaps because you're integrating Tailwind into an existing project or you'd prefer to define your own base styles—you can do so by importing only the parts of Tailwind that you need.

By default, this is what @import "tailwindcss"; injects:

@layer theme, base, components, utilities;

@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/utilities.css" layer(utilities);

To disable Preflight, simply omit its import while keeping everything else:

 @layer theme, base, components, utilities;

 @import "tailwindcss/theme.css" layer(theme);
-@import "tailwindcss…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@szymboro
Comment options

Answer selected by szymboro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants