[wp-trac] [WordPress Trac] #56990: Render blocking CSS `classic-themes.css` unnecessarily enqueued

WordPress Trac noreply at wordpress.org
Fri Nov 11 14:59:10 UTC 2022


#56990: Render blocking CSS `classic-themes.css` unnecessarily enqueued
-------------------------------------+-------------------------------
 Reporter:  adamsilverstein          |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Themes                   |     Version:  6.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  css, performance
-------------------------------------+-------------------------------

Comment (by adamsilverstein):

 [attachment:"56990.2.diff"] takes a different approach, only enqueuing the
 file when a button is present in the content. In my testing, pages with
 buttons look good in the twenty-ten theme, and the classic-themes CSS is
 only enqueued when there is a button.

 @Mamaduka does this look good or can you propose a better way to ensure
 the CSS is only enqueued on pages that actually contain a button?

 Also: should we inline this CSS directly instead of loading it from an
 external file?

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


More information about the wp-trac mailing list