diff --git a/packages/block-library/src/reset.scss b/packages/block-library/src/reset.scss index cf5e5a1596df5..df25b2c96e387 100644 --- a/packages/block-library/src/reset.scss +++ b/packages/block-library/src/reset.scss @@ -8,19 +8,18 @@ // We use :where to keep specificity minimal. // https://css-tricks.com/almanac/selectors/w/where/ :where(.editor-styles-wrapper) { - /** - * The following styles revert to the browser defaults overriding the WPAdmin styles. - * This is only needed while the block editor is not being loaded in an iframe. - */ - font-family: serif; // unfortunately initial doesn't work for font-family. - font-size: initial; - line-height: initial; - color: initial; + // The following styles revert to the browser defaults overriding the WPAdmin styles. + html & { + font-family: serif; // unfortunately initial doesn't work for font-family. + font-size: initial; + line-height: initial; + color: initial; - // Many themes with white backgrounds load editor styles but fail to also provide - // an explicit white background color, assuming a white editing canvas. - // So to match browser defaults, we provide a white default here as well. - background: #fff; + // Many themes with white backgrounds load editor styles but fail to also provide + // an explicit white background color, assuming a white editing canvas. + // So to match browser defaults, we provide a white default here as well. + background: #fff; + } .wp-align-wrapper { max-width: $content-width;