Skip to content

Allow disabling built-in core utilities in v4 #19839

@cernymatej

Description

@cernymatej

What version of Tailwind CSS are you using?

v4.2.2

What build tool (or framework if it abstracts the build tool) are you using?

Vite 7.3.1

What version of Node.js are you using?

v24.14.0

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/a45Fd8kSRO

Describe your issue

In v3, corePlugins allowed disabling individual built-in utilities:

module.exports = {
    corePlugins: {
        container: false,
    }
}

There's no equivalent in v4. This is a problem when you need a completely custom implementation of a built-in utility like container.

Defining a custom @utility doesn't replace the built-in -> both are emitted in the output CSS.

@source not inline("container") doesn't help either because it prevents the class name from being detected in source files entirely, which also blocks the custom @utility from being generated.

Some possible solutions could be:

  1. custom @utility replaces built-in: when a user defines @utility, the built-in is automatically suppressed.
  2. @source not inline(...)-like directive which disables only built-in utilities

related: #256

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