Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop :not() selector with same class name as @apply #6349

Closed
almeric opened this issue Dec 10, 2021 · 1 comment · Fixed by #6365
Closed

Infinite loop :not() selector with same class name as @apply #6349

almeric opened this issue Dec 10, 2021 · 1 comment · Fixed by #6365

Comments

@almeric
Copy link

almeric commented Dec 10, 2021

What version of Tailwind CSS are you using?

v3.0.0

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

Vite

What version of Node.js are you using?

v17.1.0

What browser are you using?

N/A

What operating system are you using?

MacOs

Reproduction URL

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

Describe your issue

body:not(.text-emerald-500) {
  @apply text-emerald-500;
}

Will cause an infinite loop, eventually exhausting memory. This is similar to #3541, except the :not() selector.

@RobinMalfait
Copy link
Member

Hey! Thank you for your bug report!
Much appreciated! 🙏

Yep this is the same issue that Adam talks about here: #3541 (comment)

It's a circular dependency since the class you are applying is also in the definition. I'll try to make it error instead doing the infinite loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants