[wp-trac] [WordPress Trac] #64150: Late-printed styles are not hoisted to HEAD if wp-block-library is not enqueued
WordPress Trac
noreply at wordpress.org
Mon Oct 27 17:08:35 UTC 2025
#64150: Late-printed styles are not hoisted to HEAD if wp-block-library is not
enqueued
--------------------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.9
Component: Script Loader | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------------
Comment (by Soean):
We use blocks and all our styles for the theme and content are in one
file: `style.css`
When I look at the HTML source code now, I see that there are 862 new
inline styles.
{{{
<style id='wp-block-heading-inline-css'>...</style>
<style id='wp-block-paragraph-inline-css'>...</style>
<style id='wp-block-button-inline-css'>...</style>
<style id='wp-block-button-inline-css'>...</style>
<style id='wp-block-buttons-inline-css'>...</style>
<style id='wp-block-cover-inline-css'>...</style>
<style id='wp-block-image-inline-css'>...</style>
<style id='wp-block-columns-inline-css'>...</style>
<style id='wp-block-group-inline-css'>...</style>
}}}
These styles increase the size of the document and are not cached like the
`style.css`.
And some inline styles break our theme styles, like this one:
{{{
.wp-block-image.aligncenter, .wp-block-image.alignleft, .wp-block-
image.alignright {
display: table;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64150#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list