Skip to content

When overriding flex-1, two utilities are generated in the output #18215

Open
@rozsazoltan

Description

@rozsazoltan

What version of Tailwind CSS are you using?

For example: v4.1.8

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

Tailwind Play

Reproduction URL

https://play.tailwindcss.com/JbMqs7VnW1?file=css

Describe your issue

@utility flex-1 {
  flex: 1 1 0px;
}

The expected result would be just one utility, the new one:

.flex-1 {
  flex: 1 1 0px;
}

But the old one is also implemented:

.flex-1 {
  flex: 1 1 0px;
}
.flex-1 {
  flex: 1;
}

If I override the entire flex-* utility, at least the specificity will be correct:

@utility flex-* {
  flex: --value(integer, [*]) 1 0px;
}
.flex-1 {
  flex: 1;
}
.flex-1 {
  flex: 1 1 0px;
}

https://play.tailwindcss.com/yPtNMkQL2r?file=css

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