[wp-trac] [WordPress Trac] #51490: Editor Styles Not Loading in Correct Sequence for Blocks

WordPress Trac noreply at wordpress.org
Fri Oct 9 16:43:04 UTC 2020


#51490: Editor Styles Not Loading in Correct Sequence for Blocks
----------------------------+-----------------------------
 Reporter:  susanwrotethis  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Editor          |    Version:  5.5.1
 Severity:  normal          |   Keywords:
  Focuses:  css             |
----------------------------+-----------------------------
 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.)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51490>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list