[wp-trac] [WordPress Trac] #61779: block.json - custom block style asset is loaded unconditionally to all pages with a non block-based theme
WordPress Trac
noreply at wordpress.org
Tue Jul 30 04:43:31 UTC 2024
#61779: block.json - custom block style asset is loaded unconditionally to all
pages with a non block-based theme
--------------------------+------------------------------
Reporter: incrediblewp | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by poena):
Hi @incrediblewp
This difference between block themes and classic themes is a known
limitation, this post explains it better than I can:
https://make.wordpress.org/core/2021/07/01/block-styles-loading-
enhancements-in-wordpress-5-8/
In short, in classic themes the styles need to be added to the footer,
after the blocks have rendered. And because this can change the loading
order of the CSS, breaking the style of existing themes, it was decided to
not load the styles conditionally by default in classic themes.
Theme developers can opt-in to loading the styles conditionally.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61779#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list