From 952532e804f654830d361a7f2c9103ba8114985a Mon Sep 17 00:00:00 2001 From: Joen A <1204802+jasmussen@users.noreply.github.com> Date: Wed, 5 Jun 2024 08:07:21 +0200 Subject: [PATCH] Try: Contextual frame bg color to avoid artifacting. (#62223) * Try: Contextual frame bg color to avoid artifacting. * Try different fix. Co-authored-by: jasmussen Co-authored-by: MaggieCabrera Co-authored-by: youknowriad --- packages/block-editor/src/components/block-canvas/style.scss | 4 ++-- packages/edit-site/src/components/layout/style.scss | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-canvas/style.scss b/packages/block-editor/src/components/block-canvas/style.scss index 43176723195445..9e924cb79bace1 100644 --- a/packages/block-editor/src/components/block-canvas/style.scss +++ b/packages/block-editor/src/components/block-canvas/style.scss @@ -1,7 +1,7 @@ iframe[name="editor-canvas"] { + box-sizing: border-box; width: 100%; height: 100%; display: block; - background-color: $gray-300; - box-sizing: border-box; + background-color: transparent; } diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index 8c15cdae338818..0c5412b6d765bb 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -4,6 +4,11 @@ color: $gray-400; display: flex; flex-direction: column; + + // Show a dark background in "frame" mode to avoid edge artifacts. + &:not(.is-full-canvas) .editor-visual-editor { + background: $gray-900; + } } .edit-site-layout__hub {