[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
Thu Aug 22 21:35:06 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
---------------------------+------------------------------
Description changed by westonruter:

Old description:

> I just did a check of the size of each core theme's `style.css` and
> here's what I found:
>
> {{{
>   221622 twentynineteen/style.css
>    98458 twentyfifteen/style.css
>    83559 twentyseventeen/style.css
>    81216 twentyfourteen/style.css
>    70311 twentysixteen/style.css
>    57356 twentyeleven/style.css
>    57106 twentythirteen/style.css
>    37606 twentytwelve/style.css
>    24688 twentyten/style.css
> }}}
>
> The `style.css` for Twenty Nineteen is 225% larger than the next-largest
> core theme stylesheet, for Twenty Fifteen.  Between 5.2.2 and 5.3-alpha,
> the size of Twenty Nineteen's CSS has grown yet another 9KB.
>
> Prior to Twenty Nineteen, themes primarily had their CSS hand-written, I
> believe. As of Twenty Nineteen, SASS was used for the first time.
> Depending on how SASS is written, a little bit of code can end up
> generating a lot of CSS. Is this the case here for Twenty Nineteen? It
> doesn't seem the large amount of CSS is directly due to styling blocks,
> since the other themes have also been updated to style blocks.
>
> A large amount of CSS has negative impact on performance. Not only does
> it increase the amount of time to render the page (as CSS is render-
> blocking) through increased data transfer time and CSS parsing time, it
> also hurts performance once the page has loaded, as there is more CSS in
> memory and more selectors to be evaluating.
>
> How can the amount of CSS in Twenty Nineteen be reduced to be more in-
> line with the other core themes?

New description:

 I just did a check of the size of each core theme's `style.css` and here's
 what I found (first column is byte size):

 {{{
   221622 twentynineteen/style.css
    98458 twentyfifteen/style.css
    83559 twentyseventeen/style.css
    81216 twentyfourteen/style.css
    70311 twentysixteen/style.css
    57356 twentyeleven/style.css
    57106 twentythirteen/style.css
    37606 twentytwelve/style.css
    24688 twentyten/style.css
 }}}

 The `style.css` for Twenty Nineteen is 225% larger than the next-largest
 core theme stylesheet, for Twenty Fifteen.  Between 5.2.2 and 5.3-alpha,
 the size of Twenty Nineteen's CSS has grown yet another 9KB.

 Prior to Twenty Nineteen, themes primarily had their CSS hand-written, I
 believe. As of Twenty Nineteen, SASS was used for the first time.
 Depending on how SASS is written, a little bit of code can end up
 generating a lot of CSS. Is this the case here for Twenty Nineteen? It
 doesn't seem the large amount of CSS is directly due to styling blocks,
 since the other themes have also been updated to style blocks.

 A large amount of CSS has negative impact on performance. Not only does it
 increase the amount of time to render the page (as CSS is render-blocking)
 through increased data transfer time and CSS parsing time, it also hurts
 performance once the page has loaded, as there is more CSS in memory and
 more selectors to be evaluating.

 How can the amount of CSS in Twenty Nineteen be reduced to be more in-line
 with the other core themes?

--

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


More information about the wp-trac mailing list