[wp-trac] [WordPress Trac] #55148: In block themes, styles should load in the head

WordPress Trac noreply at wordpress.org
Wed Feb 16 10:54:15 UTC 2022


#55148: In block themes, styles should load in the head
------------------------------------------+-----------------------
 Reporter:  oandregal                     |       Owner:  audrasjb
     Type:  defect (bug)                  |      Status:  closed
 Priority:  normal                        |   Milestone:  5.9.1
Component:  Script Loader                 |     Version:  5.9
 Severity:  normal                        |  Resolution:  fixed
 Keywords:  has-patch commit fixed-major  |     Focuses:
------------------------------------------+-----------------------
Changes (by audrasjb):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52739" 52739]:
 {{{
 #!CommitTicketReference repository="" revision="52739"
 Script Loader: Load block themes styles in the head section.

 Previously, some logic was added to load the global stylesheet in the
 bottom of `<body>` for classic themes that opted-in into loading
 individual block styles instead of a single stylesheet for them all. At
 the time, block themes always loaded the global stylesheet in the
 `<head>`. When block themes landed in core during WordPress 5.9 this logic
 wasn’t updated to consider them, hence the global stylesheet loaded in the
 `<body>` for them. This changeset fixes this.

 Props oandregal, aristath.
 Merges [52738] to the 5.9 branch.
 Fixes #55148.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55148#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list