#58480 closed defect (bug) (fixed)
Inline render blocking CSS `classic-themes.css'
Reported by: | adamsilverstein | Owned by: | spacedmonkey |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | 6.1 |
Component: | Themes | Keywords: | has-patch commit |
Focuses: | css, performance | Cc: |
Description
Related to #56990.
Since WordPress 6.1, a new CSS file classic-themes.css is now enqueued on all pages on the front end of non-block themes.
Since this is a blocking http request, the impact on performance will be affected by network conditions. Inlining the styles will fix this issue.
Opening this new ticket to inline the styles and leaving #56990 open because we still need to address the underlying issue raised there: the button CSS should only be included on pages that actually use a button block.
There is a fix available already for this in https://github.com/WordPress/wordpress-develop/pull/4511/files
Attachments (1)
Change History (12)
This ticket was mentioned in PR #4511 on WordPress/wordpress-develop by @spacedmonkey.
18 months ago
#2
- Keywords has-patch added
#4
@
18 months ago
I re-ran the WebPageTest experiments to validate the performance improvement here. These tests din't surface any notable improvement, however I still think the inline approach is better because the testing is in isolation without other factors. I still intuit field results would show an improvement.
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
18 months ago
#8
@
18 months ago
If you want to commit this for the front end now, that should be fine. However, I'm working on moving these styles out of the $editor_settings
array. Fallback styles should not have the extra .editor-styles-wrapper
class and, more importantly, they do not belong printed inside the body
after the theme-specific styles. I'm also dequeuing it from all the bundled themes (with the few necessary adjustments to theme styles). It may be better to add the script-loader and default-filters changes in one ticket (here?) and only address the theme changes in a new ticket.
@spacedmonkey commented on PR #4511:
18 months ago
#11
Committed.
https://core.trac.wordpress.org/ticket/58480