Jump to:

1368 Posts in 487 Topics by 521 members

Themes

SilverStripe Forums » Themes » New CSS Stylesheet NOT LOADED!!!

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 397 Views
  • arthurdent
    Avatar
    Community Member
    148 Posts

    New CSS Stylesheet NOT LOADED!!! Link to this post

    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 Page.ss 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?

  • martimiz
    Avatar
    Forum Moderator
    1067 Posts

    Re: New CSS Stylesheet NOT LOADED!!! Link to this post

    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
    Avatar
    Community Member
    32 Posts

    Re: New CSS Stylesheet NOT LOADED!!! Link to this post

    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.

    397 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.