Skip to content

Update "Disable Preflight" documentation: how to pass theme(static), source(), prefix(), important... #2145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hwkdev opened this issue Mar 11, 2025 · 0 comments

Comments

@hwkdev
Copy link

hwkdev commented Mar 11, 2025

Hey!

The documentation needs some updates in the Disable Preflight section, explaining how to add advanced config without @import "tailwindcss";"

I gathered some config infos here and here.

How to use source(none) without preflight:

@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities) source(none);

How to use theme(static) without preflight: (always output all variables)

@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme) theme(static);
@import "tailwindcss/utilities.css" layer(utilities);

How to use prefix(tw) without preflight:

@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme) prefix(tw);
@import "tailwindcss/utilities.css" layer(utilities);

How to use important without preflight:

@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities) important;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant