Description
When the editor style contains this line, it breaks the page entirely:
@import url('https://fonts.googleapis.com/css2?family=Lobster:wght@400;500;600;700&display=swap');
Step-by-step reproduction instructions
- Start with any classic theme
- Put the code from down below in the
functions.php
- Observe the problem
add_editor_style('some-style.css');
@import url('https://fonts.googleapis.com/css2?family=Lobster:wght@400;500;600;700&display=swap');
:root {
--test: red;
}
Result:

Expected result:
@import url('https://fonts.googleapis.com/css2?family=Lobster:wght@400;500;600;700&display=swap');
.editor-styles-wrapper {
--test: red;
}
Screenshots, screen recording, code snippet
This seems like a problem within the block-editor/src/utils/transform-styles/transforms/wrap.js file.
Environment info
WordPress 6.3, a classic theme.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Description
When the editor style contains this line, it breaks the page entirely:
Step-by-step reproduction instructions
functions.phpResult:
Expected result:
Screenshots, screen recording, code snippet
This seems like a problem within the
block-editor/src/utils/transform-styles/transforms/wrap.jsfile.Environment info
WordPress 6.3, a classic theme.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes