Skip to content

Commit

Permalink
Block editor: exclude wp- styles from iframe compat styles (#66628)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
3 people authored and cbravobernal committed Nov 4, 2024
1 parent cd691ea commit 04d57ce
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 04d57ce

Please sign in to comment.