Skip to content

Commit 272b21e

Browse files
gabrielmferngithub-actions[bot]KayleeWilliamsdependabot[bot]bukinoshita
authored
fix(preview-server): forced color-scheme: dark (#2271)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kaylee <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bu Kinoshita <[email protected]>
1 parent 19d4b45 commit 272b21e

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

.changeset/better-insects-like.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-email/preview-server": patch
3+
---
4+
5+
fix the forced `color-scheme: dark` for the preview

packages/preview-server/src/app/preview/[...slug]/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const Preview = ({ emailTitle, className, ...props }: PreviewProps) => {
162162
width={width}
163163
>
164164
<iframe
165-
className="solid max-h-full rounded-lg bg-white"
165+
className="max-h-full rounded-lg bg-white [color-scheme:auto]"
166166
ref={(iframe) => {
167167
if (iframe) {
168168
return makeIframeDocumentBubbleEvents(iframe);

pnpm-lock.yaml

Lines changed: 42 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)