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

Missing classes because of { boundary and new extractor #16999

Closed
iquito opened this issue Mar 6, 2025 · 2 comments · Fixed by #17001
Closed

Missing classes because of { boundary and new extractor #16999

iquito opened this issue Mar 6, 2025 · 2 comments · Fixed by #17001
Assignees

Comments

@iquito
Copy link

iquito commented Mar 6, 2025

What version of Tailwind CSS are you using?

v4.0.11

Reproduction

With the new extractor (#16306) the class h-4 and mx-4 is not picked up anymore when using the following Twig template content:

<div class="flex items-center mx-4{% if session.isValid %}{% else %} h-4{% endif %}"></div>

(See https://play.tailwindcss.com/w3SazyVehg for the example on Tailwind Play and the generated CSS)

I assume the { after h-4 and mx-4 is somehow not considered a (possible) boundary anymore. I think this is likely a bug, as many template languages use { and } as delimiters in some way, so the possibility of a boundary should be taken into account.

@RobinMalfait RobinMalfait self-assigned this Mar 6, 2025
@RobinMalfait
Copy link
Member

Hey!

Yep this is indeed a regression will provide a fix soon. Small note: in Tailwind Play this will not work even after the fix because we only look at the class attribute without "running" your code. But in your real projects it will be fixed with the incoming PR.

@RobinMalfait
Copy link
Member

Hey! Small update, this has been fixed by #17001 and will be available in the next release tomorrow.

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