Skip to content

Dark theme not compatible with prose / typography using new JIT engine #157

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

Closed
DoctorDerek opened this issue Mar 30, 2021 · 2 comments
Closed

Comments

@DoctorDerek
Copy link

DoctorDerek commented Mar 30, 2021

What version of @tailwindcss/typography are you using?

v0.4.0

What version of Node.js are you using?

v14.15.1

What browser are you using?

Chrome

What operating system are you using?

Windows 10

Reproduction repository

https://github.com/DoctorDerek/steven-terner.github.io/blob/master/pages/demo.js


Hi, I'm crossposting this from tailwindlabs/tailwindcss-jit#191 because it affects both libraries.


Following up on a comment from @danjac about PR #153 -- there's a bug that I'm reporting to jit & typography.

Here's an example repo that uses dark theme with prose / Tailwind typography: https://github.com/timlrx/tailwind-nextjs-starter-blog/ (not jit) and it's live here: https://tailwind-nextjs-starter-blog.vercel.app/

As you can see, prose works fine with dark mode in the old system (except for the caveat about responsive classes addressed by that PR, #153):
image

However when I tried that in a derivative from that template using the new jit engine, prose doesn't work with dark mode.
image

Source code: https://github.com/DoctorDerek/steven-terner.github.io/blob/master/pages/demo.js Live version: http://steven-terner-github-io.vercel.app/demo (That page won't stay up for particularly long, but I didn't want to spin up a new project just for this issue, sorry.)

 <article className="mx-auto space-y-6 prose">
        <SectionContainer>
          <p>
            My portfolio showcases 

I'm happy to look into it more myself if you'd like to assign me to following up on it, but now I'm just the messenger 😀

@DoctorDerek DoctorDerek changed the title Dark mode Dark theme not compatible with prose / typography using new JIT engine Mar 30, 2021
@DoctorDerek
Copy link
Author

I'm not sure if this is implementation-dependent or was fixed in a recent version change, but prose seems to work correctly with dark mode now. See timlrx/tailwind-nextjs-starter-blog#14 live at https://tailwind-nextjs-starter-blog-git-upgrade-timlrx.vercel.app/

Happy to re-open if it's a lingering issue.

@danjac
Copy link

danjac commented Apr 4, 2021

@DoctorDerek thanks for looking into this.

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

No branches or pull requests

2 participants