change color in theme cobalt

Permalink 1 user found helpful
Hi, I want to change the color backround in theme cobalt, and I can't find the css. In pages and theme's I can't change the colors of the backround.

grafischont
 
core77 replied on at Permalink Reply
Check /packages/cobalt/themes/cobalt/main.css
grafischont replied on at Permalink Reply
grafischont
Thank you, I've found it!
grafischont replied on at Permalink Reply
grafischont
I have the colors changed. But now, there has been an update on this theme and all my changes are gone. Can I use this theme make a child? As with WordPress. Or is there another way to prevent that I lose my changes in this theme
core77 replied on at Permalink Reply
I would do it this way:
Override the theme's styles in a new css file called my-overrides.css. Save this into /packages/cobalt/themes/cobalt/

Before the closing </head> add a ne line to /packages/cobalt/themes/cobalt/elements/header.php
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/my-overrides.css">


Notice:
Every time the theme was updated you have to add only this line to header.php and your styles are separated in an extra file.

I don't know if your my-overrides.css will be deleted when you update a theme. If this happens, well: copy this file again to /packages/cobalt/themes/cobalt/
grafischont replied on at Permalink Reply
grafischont
Thank you! I've done this now, and updated the theme again and it works.
Only you have to the my-overrides.css elsewhere keep as a backup. And put it back in packages/cobalt/themes/cobalt, because during the update the file disappears. And customize header.php
mhawke replied on at Permalink Best Answer Reply
mhawke
That's not really the way to override a theme as you have found out.

If all you are going to alter in the theme is the addition of this one css file then you can put your 'my-overrrides.css' file in [root]/themes/cobalt/ folder. You will need to build that path.

Then visit the Dashboard->System and Settings->Cache and Speed Settings and turn off the 'Overrides' cache. Then visit any page on the site to force concrete5 to find your override file and then you can turn the Overrides cache back on again.

This still means you will have to continue to add the < link ...> to your header file every time the theme is updated. You can completely override the theme by following this how-to:

http://www.concrete5.org/documentation/how-tos/designers/modify-a-p...
core77 replied on at Permalink Reply
Sure, that's the right way!!

Thought more about classic css override then the concrete5 overrides.
mhawke replied on at Permalink Reply
mhawke
There's nothing 'classic' about concrete5. When in Rome...
grafischont replied on at Permalink Reply
grafischont
thank you, I used the documentation of the link, which is what I was looking for. Now I can ignore the modification and my client is not running the risk that everything has gone as he performs a modification!
cheetu replied on at Permalink Reply
Great help in forums