[wp-trac] [WordPress Trac] #58519: Inline styles block styles in bundled themes

WordPress Trac noreply at wordpress.org
Mon Jun 19 16:59:26 UTC 2023


#58519: Inline styles block styles in bundled themes
-----------------------------------+------------------------------
 Reporter:  spacedmonkey           |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Bundled Theme          |     Version:  5.8
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  performance
-----------------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:  has-patch => has-patch 2nd-opinion


Comment:

 We would need metrics for loading the first page plus an identical
 page—after the browser saves the external stylesheet(s)—to compare against
 the same pages with inlined stylesheets.

 These styles are not minified, so the proposed inlining would print
 hundreds of lines on every page of the site. I thought the 162 lines for
 Twenty Seventeen's SVG icons was a lot, but inlining both the `blocks` and
 `colors-dark` would add more than 1,000 lines in that theme. I also do not
 like the extra page weight when browsers currently cache that for the next
 page view, though I can be convinced this would improve it overall.

 Sizes, as of r55932:

 ||= Stylesheet               =||= Lines =||= Bytes =||
 || Twenty Ten `blocks`            ||  255||   4,701||
 || Twenty Eleven `blocks`         ||  415||   7,732||
 || Twenty Eleven `dark`           ||  623||  13,254||
 || Twenty Twelve `blocks`         ||  447||  10,594||
 || Twenty Thirteen `blocks`       ||  683||  16,096||
 || Twenty Fourteen `blocks`       ||  423||   8,022||
 || Twenty Fifteen `blocks`        ||  715||  13,711||
 || Twenty Sixteen `blocks`        ||  464||   9,023||
 || Twenty Seventeen `blocks`      ||  479||  10,745||
 || Twenty Seventeen `colors-dark` ||  566||  18,233||

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


More information about the wp-trac mailing list