Skip to content

Base layer overiding the utility on abritary utility selector #19311

@ValkyrieWing

Description

@ValkyrieWing

What version of Tailwind CSS are you using?

4.1.12

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

"@tailwindcss/vite": "^4.1.12",

What version of Node.js are you using?

For example: v24.0.0

What browser are you using?

chrome
What operating system are you using?

windows
Reproduction URL
https://github.com/ValkyrieWing/tailwind-issue-selector-utility-class-being-overriden-by-base-layer

Describe your issue

the base layer overiding the utility instead, even !important utility

@layer base {
  * {
    @apply text-3xl;
  }
}
<div class="*:text-xs!">
  
  <div class="text-green-500">
    <div>
    helo
    </div>
  </div>
</div>

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