Skip to content

Commit

Permalink
Block editor: exclude wp- styles from iframe compat styles (WordPress…
Browse files Browse the repository at this point in the history
…#66628)

Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
  • Loading branch information
3 people authored and karthick-murugan committed Nov 13, 2024
1 parent 8f4b9a4 commit 52b3be0
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 52b3be0

Please sign in to comment.