Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#61892 new defect (bug)

Enqueue `classic-theme-styles` earlier in editor styles

Reported by: sabernhardt's profile sabernhardt Owned by:
Milestone: 6.7 Priority: normal
Severity: normal Version: 6.1
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

[54687] introduced a fallback stylesheet for Button block styles (and later File blocks) for both the front end and the editor. In the editor, that has been added within the body, after the theme's block styles.

That commit had quick fixes for Twenty Twelve and Twenty Twenty, but raising the specificity for those colors should have been unnecessary. Also, themes such as Twenty Fourteen—and non-Core themes—still have had a similar problem with the incorrect order (#61881, GB44731).

Change History (2)

This ticket was mentioned in PR #7205 on WordPress/wordpress-develop by @sabernhardt.


7 weeks ago
#1

  • Keywords has-patch added
  • Registers the stylesheet outside wp_enqueue_classic_theme_styles().
  • Enqueues classic styles in the enqueue_block_assets action instead of adding them in the block_editor_settings_all filter.
  • Deprecates the wp_add_editor_classic_theme_styles() function.

Trac 61892

@sabernhardt commented on PR #7205:


7 weeks ago
#2

Related concerns, for other tickets:

  • In the non-framed editor, stylesheets enqueued with the enqueue_block_editor_assets hook still can be added before classic-theme-styles. Trac 61591 should fix that for the bundled themes by using the enqueue_block_assets hook.
  • Twenty Ten shows the Button block links with white text in the iframe and gray in the non-framed editor, but the front end sets links to blue at a higher specificity: a:link { color: #0066cc; }
Note: See TracTickets for help on using tickets.