Closed john-griffin closed 7 months ago
Gist of HTML output from react-email that works as expected https://gist.github.com/john-griffin/fee98877edf1ef039e324dcd2760373f
Alright we tracked this down to a difference between unocss and tailwind outlined here: https://unocss.dev/presets/mini#dark
Going to work on a potential builtin solution so users don't have to know they have to prefix darkmode variants with a @
For anyone running across this issue in the meantime, the solution is to use @dark:...
instead of dark:...
Fixed this in https://github.com/shellscape/jsx-email/pull/167
@jsxp-email/cli
Version?:Expected Behavior
Expect the email background to be black due to the
dark:bg-black
class on the body when previewing in dark mode browser.Actual Behavior
Takes the light mode background style instead
Additional Information
Worked on
react-email
. Aware this is not going to work in all email clients.