[wp-trac] [WordPress Trac] #51554: Twenty Twenty theme styles get in way within editor

WordPress Trac noreply at wordpress.org
Fri Oct 30 11:55:40 UTC 2020


#51554: Twenty Twenty theme styles get in way within editor
---------------------------+---------------------
 Reporter:  karmatosed     |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.6
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  dev-feedback   |     Focuses:
---------------------------+---------------------

Comment (by kjellr):

 It sounds like this is probably due to the fact that Twenty Twenty uses
 the outdated `enqueue_block_editor_assets` hook to enqueue its editor
 styles, instead of the usual `add_editor_style()` method from the
 [https://developer.wordpress.org/block-editor/developers/themes/theme-
 support/#enqueuing-the-editor-style handbook].

 In general, Twenty Twenty should switch to using the more traditional
 `add_editor_style()` method (though it would involve quite a bit of trial
 and error to rewrite the styles with a new scope), but I do think that the
 "Use theme styles" feature in Gutenberg should try to account for styles
 loaded that via `enqueue_block_editor_assets` anyway.

 Many older themes will still enqueue their editor stylesheets that way,
 since it's still supported. Also, both Twenty Nineteen and Twenty Twenty-
 One use that `enqueue_block_editor_assets` method to enqueue custom color
 styles when they're set via the Customizer. Currently, these stylesheets
 will still be loaded even if "Use theme styles" is turned off.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51554#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list