From 94a8a1405661e7ebef88707ca509b3a1400caf23 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2024 12:53:26 +0100 Subject: [PATCH] Fix background showing through --- .../block-editor/src/components/block-list/content.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-list/content.scss b/packages/block-editor/src/components/block-list/content.scss index cc71b3f32b4515..42ec8bae39c0a1 100644 --- a/packages/block-editor/src/components/block-list/content.scss +++ b/packages/block-editor/src/components/block-list/content.scss @@ -457,11 +457,15 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b .block-editor-block-list__zoom-out-separator { /* same color as the iframe's background */ background: $gray-300; + // Additional -1px is required to avoid sub pixel rounding errors allowing background to show. + margin-left: -1px; + margin-right: -1px; } // In Post Editor allow the separator to occupy the full width by ignoring (cancelling out) the global padding. .has-global-padding > .block-editor-block-list__zoom-out-separator, .block-editor-block-list__layout.is-root-container.has-global-padding > .block-editor-block-list__zoom-out-separator { max-width: none; - margin: 0 calc(-1 * var(--wp--style--root--padding-right)) 0 calc(-1 * var(--wp--style--root--padding-left)) !important; + // Additional -1px is required to avoid sub pixel rounding errors allowing background to show. + margin: 0 calc(-1 * var(--wp--style--root--padding-right) - 1px) 0 calc(-1 * var(--wp--style--root--padding-left) - 1px) !important; }