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

Fix intellisense for plugins with multiple @apply rules #8213

Merged
merged 2 commits into from Apr 27, 2022

Conversation

thecrypticace
Copy link
Contributor

Intellisense uses expandApplyAtRules directly and doesn’t partition them. When a plugin registers components using something like ”@apply flex”: {} more than once in the same component intellisense will break. This isn’t a problem for Tailwind CSS proper because we do rule partitioning. Given that Intellisense is using it directly though we shouldn’t outright break in the face of this situation even if the result isn’t 100% accurate (the source maps won’t be correct for all but the first @apply found but that should not cause issues for Intellisense).

Fixes #8203

thecrypticace and others added 2 commits April 27, 2022 11:59
Intellisense uses `expandApplyAtRules` directly and doesn’t partition them. When a plugin registers components using something like `”@apply flex”: {}` more than once in the same component intellisense will break. This isn’t a problem for Tailwind CSS proper because we do rule partitioning. Given that Intellisense is using it directly though we shouldn’t outright break in the face of this situation even if the result isn’t 100% accurate (the source maps won’t be correct in this case).

Co-authored-by: psucoder <hungle.info@gmail.com>
@thecrypticace thecrypticace merged commit 89bf2ed into master Apr 27, 2022
@thecrypticace thecrypticace deleted the fix/intellisense-plugins-with-at-apply branch April 27, 2022 16:09
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 this pull request may close these issues.

Bug with multiple @apply in one parent
1 participant