From 04d57ce89fa7e7d06f654f50d3aa5624ac3e8efc Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:05:02 +0100 Subject: [PATCH] Block editor: exclude wp- styles from iframe compat styles (#66628) Co-authored-by: ellatrix Co-authored-by: Mamaduka --- .../components/iframe/get-compatibility-styles.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/block-editor/src/components/iframe/get-compatibility-styles.js b/packages/block-editor/src/components/iframe/get-compatibility-styles.js index 0eae82b11e01f8..fd14e02a219bf6 100644 --- a/packages/block-editor/src/components/iframe/get-compatibility-styles.js +++ b/packages/block-editor/src/components/iframe/get-compatibility-styles.js @@ -37,15 +37,10 @@ export function getCompatibilityStyles() { return accumulator; } - // Don't try to add the reset styles, which were removed as a dependency - // from `edit-blocks` for the iframe since we don't need to reset admin - // styles. - if ( - [ - 'wp-reset-editor-styles-css', - 'wp-reset-editor-styles-rtl-css', - ].includes( ownerNode.id ) - ) { + // Don't try to add core WP styles. We are responsible for adding + // them. This compatibility layer is only meant to add styles added + // by plugins or themes. + if ( ownerNode.id.startsWith( 'wp-' ) ) { return accumulator; }