{"id":4749049,"date":"2014-03-27T11:27:14","date_gmt":"2014-03-27T11:27:14","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/feature-request-wp_enqueue_style-with-priorityload-order\/"},"modified":"2016-08-21T18:43:49","modified_gmt":"2016-08-21T18:43:49","slug":"feature-request-wp_enqueue_style-with-priorityload-order","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/feature-request-wp_enqueue_style-with-priorityload-order\/","title":{"rendered":"Feature Request: wp_enqueue_style with priority\/load order"},"content":{"rendered":"<p>Requested: A way to control the order style sheets are loaded.<br \/>\nImplementation: Something like the do_action priority numbers &#8212; smaller numbers are loaded earlier, higher numbers loaded later.<\/p>\n<p>Justification: Plugin stylesheets are enqueued AFTER theme stylesheets.<br \/>\nThe result is that some features (color, background-color, etc) might look awful with some themes.  The theme-related &#8220;adjustment CSS&#8221; for this needs to be loaded AFTER the plugin CSS, but should be stored with the child theme CSS files for sanity\/maintainability &#8212; different &#8220;adjustment CSS&#8221; would be required if the site switches themes, so modifying the plugin or creating a separate &#8220;adjust Events for theme-of-the-year&#8221; plugin seems less easy to maintain.<\/p>\n<p>Implementing style enqueuing order would allow loading &#8220;adjustment CSS&#8221; AFTER plugin CSS is loaded.<\/p>\n<p>Workaround: themes\/childtheme\/Adjustment.CSS can be read into a string and enqueued as inline CSS.<\/p>\n<p>Thanks for considering this feature request.<\/p>\n","protected":false},"template":"","class_list":["post-4749049","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4749049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4749049\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4749049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}