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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Change priority order of CSS in Requirements::themedCSS

Go to End

3 Posts   3241 Views

Aaron Brockhurst

Community Member, 30 Posts

30 May 2009 at 11:11am


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


Carbon Crayon

Community Member, 598 Posts

3 June 2009 at 9:09pm

Hi Aaron

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: though not sure it is for the current version based on will's last comment in the ticket.

Hope that helps


Aaron Brockhurst

Community Member, 30 Posts

3 June 2009 at 9:19pm

Hi Aram

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