Global Custom CSS

Permalink 1 user found helpful
Hi,

I have just started using Concrete5 and I really like its simplicity, flexibility and power.

How would I go about including custom css rules to all themes? Can I extend Concrete5 to provide this functionality?

My idea is to have a customizable style sheet that I can use to override styles (for example fonts, colors, ...) added by the core and/or themes independent of the theme selected.

Ideas, hints and suggestions are welcome.

 
mikefatty replied on at Permalink Reply
mikefatty
Hi, i always use the rule ex.:

h2{
color:#0f0!important;
}

!important, will overwrite all other rules in other stylesheets :-)

Hope that helps;)


/Mike
mckoenig replied on at Permalink Reply
mckoenig
Of course you can do that. Just set up your own CSS stylesheet, put it anywhere in the folder of the theme you want to customize (it makes the most sense to put it in the CSS folder but you don't have to follow that rule) and link to it in your header. Be sure to link your stylesheet last as otherwise any rule you put in there might get overridden by one supplied by the system.
Say you put your custom CSS in the css folder of the theme that just add this line to your header in the <head> section and change the filename to the one of your CSS file:

<style type="text/css" media="screen">@import "<?php echo $this->getStyleSheet('css/your_custom_css_filename.css')?>";</style>
JD46 replied on at Permalink Reply
I found a bit of code on google developers
body {
  font-family: 'Tangerine', serif;
  font-size: 48px;
  text-shadow: 4px 4px 4px #aaa;
}


I don't think this is a complete CSS document though, how do I use this? I want to override body fonts globally. And also Header and title fonts in the future.
martbase replied on at Permalink Reply
Thanks for the prompt replies.

However I would like to automatically load my custom css into all pages on a website regardless of the theme selected.

Even when the website theme is changed my custom css should be included without actually modifying the theme thus ensuring my style sheet is shared across all pages/themes!
JohntheFish replied on at Permalink Reply
JohntheFish
I think (have never tried it), that putting your css file in the root css directory will result in it always being loaded.

If you want an easier and online editable solution, you could use
http://www.concrete5.org/marketplace/addons/style-quickie/...
With a block in a global area
JD46 replied on at Permalink Reply
Hi!
I know this thread is old, but I would like to know how I can do this? I don't know how to write a CSS, could someone upload a test CSS? I just want to override body fonts completely, because right now Arial black shows up most places but the blog uses the regular arial which is really ugly. Please help :D