tailwindlabs / tailwindcss-jit

MIT License
2.19k stars 40 forks source link

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

Closed DoctorDerek closed 3 years ago

DoctorDerek commented 3 years ago

What version of @tailwindcss/jit are you using?

v0.1.7

What version of Node.js are you using?

v14.15.1

What build tool (or framework if it abstracts the build tool) are you using?

Next.js (details below)

What browser are you using?

Chrome latest 64-bit 89.0.etc

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 https://github.com/tailwindlabs/tailwindcss-typography/issues/157 because it affects both libraries.


Following up on a comment from @danjac about https://github.com/tailwindlabs/tailwindcss-typography/pull/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 https://github.com/tailwindlabs/tailwindcss-typography/pull/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 commented 3 years ago

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 https://github.com/timlrx/tailwind-nextjs-starter-blog/pull/14 live at https://tailwind-nextjs-starter-blog-git-upgrade-timlrx.vercel.app/

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