Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35229


Ignore:
Timestamp:
12/26/2015 10:58:14 AM (9 years ago)
Author:
dd32
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35229 – Description

    initial v1  
    11Currently WordPress generates and ships relatively large 235K `wp-admin.min.css` and `wp-admin-rtl.min.css` files which are created from source files which we also ship.
    22
    3 I'd like to propose that we stop generating these files, and instead rely upon `load-styles.php` instead  to combine them.
     3I'd like to propose that we stop generating these files, and instead rely upon `load-styles.php` to combine them.
    44
    55My main reason is that I'd love for commits such as [35896] not to cause 510KB of CSS to require be shipped to end users (That's the two 235K wp-admin files, plus dashboard.css/rtl). Instead, we'd only have to ship the 4 dashboard.css files which is around 72K.
    66
    7 Package size for regular releases won't be changed significantly, full package sizes would increase by 40K as we'd no longer get the benefit of the CSS minification process combining some CSS rules which are currently in separate files. (Currently wp-admin/css is 2,240KB and would be 2,280KB after this proposal)
     7Package size for regular releases won't be changed significantly, full package sizes would increase by 88K as we'd no longer get the benefit of the CSS minification process combining some CSS rules which are currently in separate files. (Currently wp-admin/css is 2,240KB and would be 2,328KB after this proposal)
    88
    9 We'd still need to generate `wp-admin.min.css` and friends I guess for those who include it directly.
     9We'd still need to generate `wp-admin.min.css` and friends as back-compat for those who include it directly, although `script-loader.php`s dependencies will take care of `wp_enqueue_style( 'wp-admin' )`.
    1010
    1111Attached is a patch which does:
     
    1515 * Allows for `load-styles.php` to accept `load[]` like `load-scripts.php` to work around long-query-string limitations on some servers
    1616
    17 The only real downside of doing this is that we're effectively shifting from pre-compute to on-demand concatenation, not a huge deal IMHO as we cache the output of `load-styles.php` for 1 year already.
     17The only real downside of doing this is that we're effectively shifting from pre-compute to on-demand-on-millions-of-sites concatenation, not a huge deal IMHO as we set cache headers on`load-styles.php` for 1 year already.
    1818It also shows how much needless CSS we load on all admin pages.