Jump to:

3435 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » Help: admin stylesheets interfering with the theme CSS

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

Page: 1
Go to End
Author Topic: 1740 Views
  • jailja
    Avatar
    Community Member
    7 Posts

    Help: admin stylesheets interfering with the theme CSS Link to this post

    Is it possible to keep SS admin stylesheets from interfering with the theme CSS?

    I have some painfull problems with current CSS, because SS inherits some of the CSS from /cms/css/typography.css and /cms/css/layout.css. I Wouldnt want to start tweaking those admin stylesheets, because I am pretty sure it will end badly.

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Help: admin stylesheets interfering with the theme CSS Link to this post

    This is because your page.ss file or your Page.php file has the lines <% require typography.css %> or Requirements::css('typography.css'). By require it looks in your theme, if those files don't exist in your theme then it pulls the files from a module (eg the cms module).

    To not include a typography.css file just open up themes/yourtheme/templates/Page.ss or mysite/code/Page.php and remove the specific Requirements call which is including typography.

    As an aside if you're wondering why a link to a css file is defined in 2 places, it is for legacy reasons as earlier versions didn't have the template <% require %> tag.

  • jailja
    Avatar
    Community Member
    7 Posts

    Re: Help: admin stylesheets interfering with the theme CSS Link to this post

    Thanks for the tip! That worked.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Help: admin stylesheets interfering with the theme CSS Link to this post

    I'm having this same problem, except the include tags ARE removed. The CMS css files still get attached. What gives?

    --

    Update: never mind

    1740 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.