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.

Template Questions

Help: admin stylesheets interfering with the theme CSS


Reply

4 Posts   1764 Views

Avatar
jailja

7 November 2009 at 7:20am Community Member, 7 Posts

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.

Avatar
Willr

7 November 2009 at 9:52am Forum Moderator, 5511 Posts

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.

Avatar
jailja

8 November 2009 at 12:32am Community Member, 7 Posts

Thanks for the tip! That worked. :)

Avatar
Ryan M.

12 November 2009 at 1:53pm (Last edited: 12 November 2009 1:55pm), Community Member, 309 Posts

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

--

Update: never mind :)