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:

Themes /

Discuss SilverStripe Themes.

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

New CSS Stylesheet NOT LOADED!!!

Go to End

3 Posts   1638 Views


Community Member, 216 Posts

10 March 2014 at 2:12pm

Edited: 10/03/2014 2:16pm

The capitals and exclamation marks are there because this is the first time this has happened to me and I can't see what fundamental point I am missing.

I'm building a responsive theme for a client. In addition to the standard 'Layout' and 'Typography' stylesheets I have an additional stylesheet, 'Nav' that has successfully loaded. The last stylesheet is one that I have used on many sites, based on the 960px grid system with responsive breakpoints included. Naturally enough, this is the file that sets the width of elements on different devices. Strangely enough, despite being included in the theme's CSS directory and called in the head of my file (<% require themedCSS('960-12-col') %>) the Stylesheet refuses to show and the pages look like crap.

I've even tried including a call in my Page.php file, (Requirements::themedCSS('960-12-col'); ), which I understand is not necessary in later versions of SilverStripe, but the bloody thing still isn't there!

So what am I missing here? Any pointers?


Forum Moderator, 1391 Posts

11 March 2014 at 9:33am

So you have two custom stylesheets, both living in the theme's css folder, and required ialongside? But one loads and the other doesn't and you checked case and location? Then I see no reason why - unless it's something with the filename... Try calling it grid.css just for the sake of it?

Tim Snadden

Community Member, 32 Posts

15 May 2014 at 7:38am

Requirements silently discards files that it can't find. To debug try requesting the file directly and check that it loads. Also try referencing it directly in your template rather than including via requirements. If this works and the file is accessible I would start debugging the themedCSS function in requirements (either using something like xdebug or old-skool error_log/var_dump) to find out what is going on.