-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I find myself often in situations where I modify the admin to my needs. To do that I have to override styles and add JavaScripts. They are added either via a module or in site/init.php.
$config->scripts->add($config->urls->templates . "admin/admin.js");
$config->styles->add($config->urls->templates . "admin/admin.css");
The problem with this approach is, that I can not really add/append them BEFORE/AFTER all other modules (for example core modules) added their assets.
For example if I want to modify the CSS of ProcessPageLister I have to add !important
to my rules, which is bad practice, because my admin.css gets loaded first, and then the ProcessPageLister.css is loaded afterwards.
So it would be nice if we had the possibility to prepend or append scripts and stylesheets in the admin.
I know I could modify the ProcessPageLister.scss and generate the CSS, but that would destroy upgradeability of the module as the styles are then overwritten again.