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

WordPress Trac noreply at wordpress.org
Wed Feb 16 10:34:35 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  |     Focuses:
------------------------------+-----------------------
Changes (by audrasjb):

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


Comment:

 In [changeset:"52738" 52738]:
 {{{
 #!CommitTicketReference repository="" revision="52738"
 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.
 Fixes #55148.
 }}}

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


More information about the wp-trac mailing list