Skip to content

max-w-<token> resolving to spacing, not --container variables. #19671

@itsjamie

Description

@itsjamie

What version of Tailwind CSS are you using?
v4.1.18

What build tool (or framework if it abstracts the build tool) are you using?
@tailwindcss/postcss 4.1.18, next 16.1.6,

What version of Node.js are you using?
v22.22.0

What browser are you using?
Chrome

What operating system are you using?
macOS

Reproduction URL
https://play.tailwindcss.com/iEcHurSx09

Describe your issue
Adding a --spacing-2xl, overrides the --max-w-2xl, which says it uses --container-2xl in the documentation. However, it appears to be resolving to the spacing tokens.

Defining the container-2xl first or after it doesn't change the resulting styles from a .max-w-2xl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions