Opened 5 years ago
Closed 3 weeks ago
#51490 closed defect (bug) (invalid)
Editor Styles Not Loading in Correct Sequence for Blocks
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.5.1 |
Component: | Editor | Keywords: | reporter-feedback close |
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.)
Change History (3)
This ticket was mentioned in Slack in #core-css by kirstyburgoine. View the logs.
4 years ago
#3
@
3 weeks ago
- Keywords close added
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Thank you for reporting this. However, after reviewing it now, I tend to agree with the last comment that this is most likely not a default setting, but rather an implementation issue.
As no other information is available, I will move this to closed for now, but we can always reconsider its status at a later point.
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.