[wp-trac] [WordPress Trac] #20729: Improve Admin Colors CSS enqueuing

WordPress Trac noreply at wordpress.org
Thu Feb 20 06:48:11 UTC 2014


#20729: Improve Admin Colors CSS enqueuing
-----------------------------------------------+---------------------------
 Reporter:  westi                              |       Owner:
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  3.9
Component:  Script Loader                      |     Version:  3.1
 Severity:  normal                             |  Resolution:
 Keywords:  needs-patch westi-likes 3.5-early  |     Focuses:
                                               |  administration
-----------------------------------------------+---------------------------
Changes (by nacin):

 * focuses:   => administration
 * component:  Administration => Script Loader


Comment:

 [18577/trunk/wp-admin/admin-header.php] changed things a bit —
 wp_admin_css() is no longer used.

 I've been tracing through this and I don't think we can make any changes
 that would look any less hacky.

 We no longer always print colors (as of [27111] / #18380). Since it is to
 override other things, realistically it should go after all core styles
 that have the potential to be lumped into load-styles.css — that is
 anything other than ie.css, really. The way we handle colors isn't the
 problem. Our dependencies code doesn't guarantee order. But neither does
 load-scripts/styles, and certainly without the expectation of it being
 consistent between the two. Even regular CSS files could appear in an
 order different from what is expected.

 If we ever had an independent CSS file again that needs to load *after*
 colors (which is entirely possible), it should declare colors as a
 dependency. But even that would not have worked because of how our
 dependencies code was not originally written for concatenation, which was
 shoehorned in later.

 Very simply there's no good way to fix this, but where we are at now
 (thanks to changes in 3.8 and now 3.9 to how color schemes work) means the
 breakage is much smaller.

 I think it would be nice to make it so the handle gets its source up
 front, for the benefit of a custom concatenator. Otherwise this is a
 wontfix.

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


More information about the wp-trac mailing list