Opened 3 years ago
Last modified 2 years ago
#51490 new defect (bug)
Editor Styles Not Loading in Correct Sequence for Blocks
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.5.1 |
Component: | Editor | Keywords: | reporter-feedback |
Focuses: | css | Cc: |
Description
In the block editor, styles loaded by WP core are overriding those from editor-style.css in a custom theme I'm building, causing particular display issues with line heights and margins for header blocks.
It appears as though this is due to an error at line 190 of edit-form-blocks.php, the file that sets up $editor_settings. The line:
if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) {
The current_theme_supports check should be for 'editor-style' rather than 'editor-styles'. As a result, styles from editor-style.css are being skipped.
(Some earlier sequence is loading the styles from editor-style.css, so they do exist in the block editor. However, the WP core styles loaded in edit-form-blocks.php are overriding them.)
Hi @susanwrotethis and thanks for opening the ticket!
Please confirm whether you have both of these:
A similar report is on GitHub regarding the documentation for
add_theme_support
plusadd_editor_style
with the block editor. The theme support function is supposed to includeeditor-styles
, andadd_editor_style
does not have the s.