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

Don't output unparsable arbitrary values #7789

merged 3 commits into from Mar 8, 2022


Copy link

When Tailwind CSS detects arbitrary values that use "dynamic-like" placeholders (e.g. h-[${sizes.height}]) we would still output the CSS. This would result in a rule like height: ${sizes.height} which is a syntax error. We were already doing a check to only output rules for arbitrary properties if they result in parsable CSS. I've refactored the code and added a check so we now do the same thing for any arbitrary value and will now skip generating utilities in this case.

As a reminder Tailwind CSS does not process your source code and does not generate utilities from dynamic classes which you can read more about here:

Fixes #7771

@thecrypticace thecrypticace merged commit 68d896b into master Mar 8, 2022
@thecrypticace thecrypticace deleted the fix/unparsable-arbitrary-values branch March 8, 2022 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

JIT analysis the comments code to add that classes instead of omit it
1 participant