From 698880552ff93394875f56e8118a8511fc6fa398 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 12 Oct 2023 10:15:36 +0000 Subject: [PATCH] Twenty Nineteen: Add margins to editor iframe content. At screen widths of at least 768px (tablet size), Twenty Nineteen should have a `max-width` and side margins for content in the post editor. This commit applies that style to the new `.block-editor-iframe__body` class, resolving an issue where full-width blocks had a horizontal scrollbar in the editor iframe. Props sabernhardt, smit08, nidhidhandhukiya, mukesh27, darshitrajyaguru97, oglekler, poena, shailu25, nicolefurlan. Fixes #59449. git-svn-id: https://develop.svn.wordpress.org/trunk@56832 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentynineteen/style-editor.css | 2 +- src/wp-content/themes/twentynineteen/style-editor.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentynineteen/style-editor.css b/src/wp-content/themes/twentynineteen/style-editor.css index 3dd9c1eb8a..54487026e2 100644 --- a/src/wp-content/themes/twentynineteen/style-editor.css +++ b/src/wp-content/themes/twentynineteen/style-editor.css @@ -605,7 +605,7 @@ body .wp-block.aligncenter { } @media only screen and (min-width: 768px) { - body.block-editor-writing-flow, + body.block-editor-iframe__body, body.block-editor-writing-flow, body .block-editor-writing-flow { max-width: 80%; margin: 0 10%; diff --git a/src/wp-content/themes/twentynineteen/style-editor.scss b/src/wp-content/themes/twentynineteen/style-editor.scss index 2c129c809a..ce8a2883f8 100644 --- a/src/wp-content/themes/twentynineteen/style-editor.scss +++ b/src/wp-content/themes/twentynineteen/style-editor.scss @@ -36,6 +36,7 @@ body { @include media(tablet) { + &.block-editor-iframe__body, &.block-editor-writing-flow, .block-editor-writing-flow { max-width: 80%;