You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix bug with nested @apply rules in utility classes (#17924)
## Bug
When one utility applied another utility that contained pseudo-selectors (like :hover, :disabled),
the pseudo-selectors were not properly carried through the dependency chain. This was because
we were only tracking dependencies on the immediate parent rather than all parents in the path.
## Fix
- Modified the dependency resolution to track dependencies through the entire parent path
- Rewrote the node replacement logic to use the more robust walk() function
- These changes ensure pseudo-selectors are properly preserved when utilities apply other utilities
## Test Plan
- Run `vitest run packages/tailwindcss/src/index.test.ts` to verify the new test case passes
- The test case verifies that when utility 'test2' applies utility 'test' with hover/disabled states,
all pseudo-selectors are correctly preserved in the output CSS
0 commit comments