wordpress-develop
wordpress-develop copied to clipboard
Further preserve original CSS cascade when hoisting late-printed styles
Trac ticket: https://core.trac.wordpress.org/ticket/64354
TODO
- [x] Add test for when
classic-theme-stylesis not enqueued. - [x] Add test for when
global-stylesis not enqueued. - [x] Ensure that block styles enqueued at
enqueue_block_assetswill get printed afterclassic-theme-stylesviaenqueue_block_styles_assets().
Note that we do not need to consider what wp_enqueue_registered_block_scripts_and_styles() outputs because it short-circuits if wp_should_load_block_assets_on_demand() is enabled, and wp_hoist_late_printed_styles() will not run when on-demand loading is disabled.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.