Skip to content

[v4] Breaking change: When using the important flag, @apply now also make all of the declarations !important #17448

Closed
@WouterDeGeringel

Description

@WouterDeGeringel

Hi there,

I am trying to upgrade a project from tailwind v3 to v4.

I found that in v4 when using the important flag and then use @apply to inline any existing utility classes into my own custom CSS, these lines get "!important" added to them.

In v3 this was not the so.

I am not sure if this is a bug or an change. If it is intentional, then maybe the upgrade guide should be mention this.

If there is a way to prevent @apply to add the "!mportant" rule, I would love to know.

Regards

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