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 generation of prose-headings variant #264

Merged
merged 2 commits into from Apr 13, 2022

Conversation

thecrypticace
Copy link
Contributor

When using prose-headings:{utility} we were generating .prose-headings\:{utility} h1, h2, h3 which does not work the way we expect. Right now addVariant(…) does not replace multiple uses of & in a selector so we have to use the parallel variant support instead where we pass an array and generate separate rules. For example we have to generate this

.prose-headings\:{utility} h1 { … }
.prose-headings\:{utility} h2 { … }
.prose-headings\:{utility} h3 { … }
…

instead of a single selector.

Fixes #263

@vercel
Copy link

vercel bot commented Apr 13, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-typography/76BEiXSfsJNkvP8oUbzGmE6FUkPa
✅ Preview: https://tailwindcss-typography-git-fix-prose-headin-e96dbf-tailwindlabs.vercel.app

@thecrypticace thecrypticace changed the title Fix prose-headings variant Fix generation of prose-headings variant Apr 13, 2022
@thecrypticace thecrypticace merged commit ac0fcda into master Apr 13, 2022
@thecrypticace thecrypticace deleted the fix/prose-headings-variant branch April 13, 2022 14:30
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.

Headings element modifiers not working in legacy mode
1 participant