Yellow Text!

Yellow Text!

by Alex CM -
Number of replies: 8

Hi, I've had a good look through the forums and can't see any answer to my question.

I want yellow text rather than black text for the body text and headings. I've created a modified theme which is a mix of the Metal (for a .png background) and Formal White (for a logo header) and so far so good:

I just can't understand why the colors.css i've modified doesn't change font colors. I've taken out every instance of #FFFFFF in the WHOLE sheet and still I see white in the background yet when I test my sheet on this site:

http://www.oswt.co.uk/developments/style_sheet_viewer/index.php

All my text is yellow!! FTP the sheet to the theme folder I get nothing!

Is there a cache I need to flush like TYPO3? Is there some variable I need to change? Any help would be much appreciated!

Thanks in advance.

Alex

http://www.cosmicoutpost.co.uk/moodle/
Average of ratings: -
In reply to Alex CM

Re: Yellow Text!

by Mauno Korpelainen -

Hi Alex,

when you said you have a mix of two themes you should check the config.php of your theme folder and find $THEME->sheets = array('xxxxx','xxxxx','colors');

There you should have colors (without .css) and other style sheets of your theme. If there are several same kind of settings the last one will remain.

In reply to Mauno Korpelainen

Re: Yellow Text!

by Alex CM -

Thanks Mauno,

I have this in the config.php

$THEME->sheets = array('gradients', 'fonts', 'colors');

and that corresponds with the three style sheets in the folder.

The sheet seems to be fine to. I've even added some color to the tags using this CSS editor:

http://www.causeway.co.uk/freestuf/cssedit/download.htm

But still nothing!

In reply to Alex CM

Re: Yellow Text!

by Mauno Korpelainen -

Now I know: there are lots of tags that do not exist in your colors.css and those colors are taken from Standard theme.  Try for example: table, td, th, li, a:link

You could copy all those color tags from Standard theme styles_colors.css that have color #000000 or #000 to notepad, find/replace colors with yellow and paste these settings to your colors.css

In reply to Mauno Korpelainen

Re: Yellow Text!

by Alex CM -

Sorry Mauno, no luck so I have gone back to basics.

I have now copied the standard theme and have tried to turn the text yellow. This way I am not mixing themes and confusing things.

I changed the docstyles.php adding:

body {
    color:#FFCC00;
}
p, a {
    font-size:small;
}

h1, h2, h3 {
    padding-left:0px;
    background-color:transparent;
    color:#FFCC00;

And added font colors to every tag on the styles_color.css.

Then cleared the explorer cache and still I have black text! I just don't get it!

In reply to Alex CM

Re: Yellow Text!

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Alex > I changed the docstyles.php adding etc.

Oops! that docstyle.php file is a remnant of a really old Moodle version (1.4 I think) and it should really have disappeared altogether from current distributions. There is no way you can change your site's appearance by changing things in that file.

In one of your previous messages you wrote: "I've taken out every instance of #FFFFFF in the WHOLE sheet and still I see white in the background yet when I test my sheet "

Of course, white is the default background color in browsers! If you don't declare another color for your background, it will be white.

I've just looked at your site, http://www.cosmicoutpost.co.uk/moodle/login/index.php and the text is indeed yellow, but the background is white, which makes the text hardly legible. If you simply added this declaration to your theme's styles_color.css:

body {background-color:#000000}

it would look much better.

Hope that helps,

Joseph

Attachment image000.jpg
In reply to Alex CM

Re: Yellow Text!

by Mauno Korpelainen -

There is one very simple solution too, take away styles_color standard sheets from config.php of your theme:

in $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color');

clean color definitions

$THEME->standardsheets = array('styles_layout','styles_fonts');

and make sure that you have

body {
    color:#FFCC00;
}
in your colors.css

Change also in config.php

$THEME->parentsheets = true;

to $THEME->parentsheets = array('styles_layout','styles_fonts');

Finally: there are a couple of color definitions in styles_fonts.css and styles_layout.css (allthough there should not be)

In reply to Alex CM

Re: Yellow Text!

by Alex CM -

Thanks for telling me you could see the yellow text Joseph, I deleted my internet cache rather than just refreshing it and I can see the Yellow text too! (Can you tell this is the first theme I've created!?) Mauno, now I can see the text there is no need alter the config.php!

If you take a look now you'll see I'm just about there:

http://www.cosmicoutpost.co.uk/moodle/

Though I don't think the background color for the body tag worked because the background colour of the the configure pages is still white and the Add New Course title bar (bread crumb trail?!) is grey.

I added body {color:#FFCC00; background-color:Black; } and set everything in the .css with a background to black.

Thanks very much for your help!