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 prose-invert when used with colors in light mode #315

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

reinink
Copy link
Member

@reinink reinink commented Aug 30, 2023

Fixes #228

This PR fixes an issue where prose-invert wasn't working when used with a prose-{color} modifier while in light mode. For example:

<div class="prose prose-invert prose-slate bg-slate-900 p-12">
  Lorem ipsum dolor sit amet...
</div>

Prior to this fix you'd get this:

image

With this change, you get this:

image

The solution here is what @adamwathan suggested in the linked issue, where we need to make sure that the invert styles come last in the list of modifiers — which causes them to be generated last in the outputted CSS.

@vercel
Copy link

vercel bot commented Aug 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-typography ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 7:43pm

@thecrypticace
Copy link
Contributor

LGTM

@reinink reinink force-pushed the fix-invert-with-colors branch from a5f9749 to 54c0fd1 Compare August 30, 2023 19:43
@reinink reinink merged commit 0339c42 into master Aug 30, 2023
@reinink reinink deleted the fix-invert-with-colors branch August 30, 2023 20: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.

prose-invert not working as expected
2 participants