Skip to content

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

Open
@hwkdev

Description

@hwkdev

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions