[wp-trac] [WordPress Trac] #47925: Twenty Nineteen: Size of style.css seems excessively large (225% larger than next largest theme's CSS)

WordPress Trac noreply at wordpress.org
Fri Aug 23 00:02:05 UTC 2019


#47925: Twenty Nineteen: Size of style.css seems excessively large (225% larger
than next largest theme's CSS)
---------------------------+------------------------------
 Reporter:  westonruter    |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  5.0
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  performance
---------------------------+------------------------------

Comment (by SergeyBiryukov):

 I've encountered a similar issue with the `wporg-support` theme in
 #meta2479.

 The theme's usage of SASS' `extend` feature caused some excessively
 verbose selectors, most of which were never used and created unnecessary
 bloat, even hitting a limit on CSS selector length in some cases.

 [https://www.smashingmagazine.com/2015/05/extending-in-sass-without-mess/
 Extending In Sass Without Creating A Mess] is a good reading on using
 `extend` more efficiently.

 At a glance, a large part of the file is taken up by
 [source:tags/5.2.2/src/wp-content/themes/twentynineteen/style.css#L73 font
 family declarations with non-latin fallbacks], coming from
 [source:tags/5.2.2/src/wp-content/themes/twentynineteen/sass/mixins
 /_mixins-master.scss?marks=120#L123 _mixins-master.scss], which does use
 `extend`. If we find a way to optimize them, it should reduce the file
 size in half.

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


More information about the wp-trac mailing list