Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Does anyone know if it's possible to change the order that the CSS are listed when SilverStripe builds the page.
In the current version 2.3.1 the CSS in Requirements::themedCSS() statements are compiled after my custom CSS in the template. Is there a way to change the order so that the required css are compiled and then my custom css in the template?
Thanks in advance
Have you tried using the Requirements::customCSS() I think that adds it in after the other requirements.
There is also a bug in the current (and upcoming 2.3.2) versions which means that requirements are added at the end of the head section, even when you have conditional includes for IE6 etc. There is a discussion about this here:
There is also a patch available attached to this ticket:
http://open.silverstripe.com/ticket/3497 though not sure it is for the current version based on will's last comment in the ticket.
Hope that helps
Thanks for the info, I'll take a look at the two links and see if they help.
What we need is to be able to overwrite any module css with a custom one which we can then switch based on the browser using something like this
We're working on it this week so I'll post back any solutions here