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

JIT does not recognize some classes with custom attributes #7884

Closed
bakura10 opened this issue Mar 18, 2022 · 3 comments · Fixed by #8204
Closed

JIT does not recognize some classes with custom attributes #7884

bakura10 opened this issue Mar 18, 2022 · 3 comments · Fixed by #8204
Assignees

Comments

@bakura10
Copy link
Contributor

What version of Tailwind CSS are you using?

Insider version

Hi :),

I am generating classes in Liquid (Shopify programming language), but TailWind does not recognize some classes when I am using prefix + custom attributes. For instance, this is properly recognized by the JIT engine (even without spaces):

{% if settings == 'foo'%}tw-translate-x-8{% endif %}

However, this is not:

{% if settings == 'foo'%}tw-translate-x-[var(--scroll-offset)]{% endif %}

However, if I add spaces around the Liquid condition, then it is recognized:

{% if settings == 'foo'%} tw-translate-x-[var(--scroll-offset)] {% endif %}

I tried to check the doc for the condition and from my understanding the case without spaces should be catched, but it is not.

Thanks! :)

@Emmitt121

This comment was marked as spam.

@thecrypticace
Copy link
Contributor

Hey! We've rewritten our default class candidate extractor and it should be a good bit more resilient in situations like these. Would you mind giving the insiders build a test and make sure that you're seeing what you expect? npm install tailwindcss@insiders — thanks!

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.

5 participants
@thecrypticace @bakura10 @Emmitt121 and others