Change in styles_color doesn't show

Change in styles_color doesn't show

by Blair F. -
Number of replies: 10
Picture of Particularly helpful Moodlers
I'm new to themes but am going crazy trying to figure out why a change that I am making in our custom theme, in the styles_color.css file just doesn't show up! I've used Firebug to determine exactly which line needs to be changed and confirmed this by activating and inactivating that particular line of code.

I've tried to edit the line from within firebug AND by just going directly to the styles_color.css file. I've changed the $lifetime variable in the styles.php file to 1 second, I've cleared cache and STILL this change just doesn't show. I've searched all of the files to see if maybe I have the wrong file, but am sure that I don't.

I really don't know what else to try, so any help would be appreciated. Hopefully, I've provided enough info.
Average of ratings: -
In reply to Blair F.

Re: Change in styles_color doesn't show

by Blair F. -
Picture of Particularly helpful Moodlers
Update: I'm going bonkers.

The line I'm trying to remove is "color: #00A5E3," so to help me try to figure out why it wasn't working, I searched and replaced ALL occurances of #00A5E3 with #FFFFFF. Then I did a search of ALL files in the Moodle folder and subfolders for #00A5E3 to make sure it didn't show up anywhere, at all.

Then, I
* closed Moodle
* cleared cache
* re-opened browser
* returned to Moodle

.. and STILL #00A5E3 color shows up everywhere and even when I use firebug to examine the element. I have no idea where it's getting this from.

TGIF

In reply to Blair F.

Re: Change in styles_color doesn't show

by Frank Ralf -
Hi Blair,

Chances are that your settings are overridden by some parent theme's setting. CSS FAQ and Themes FAQ are good starting points for learning more about CSS and theming. You should rename your own theme so it doesn't interfere with existing themes.

hth
Frank
In reply to Frank Ralf

Re: Change in styles_color doesn't show

by Blair F. -
Picture of Particularly helpful Moodlers
Thanks, Frank. But I searched all files in our moodle installation and there are no other occurances of that color in any file in the SERVER folder or subfolders yet it keeps showing up and also shows in firebug. That's the huge mystery. It doesn't exist anywhere, yet it shows.

I'll have a look where you pointed me and see if I can find any clues.

Thanks, again.
In reply to Blair F.

Re: Change in styles_color doesn't show

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Which theme are you using?

The fact you have a style-sheet named styles_color.css suggests that is based on Standard theme, in which case if you don't define the css code correctly for the color, or layout for that matter, it will default back to standard theme's own style sheets as defined in your theme's config.php.

If you are positive you have the exact wording in your styles_color.css for example...

body { background-color: #FFFFFF; }

Sometimes you may find an inline style attached to the element you want to change. This inline styling over-rides any changes you make in the CSS file. So to make the changes work in style_color.css try adding !important after the color: for example...

body { background-color:#FFFFFF !important;}

However knowing which theme you are using helps us to give you a more accurate diagnosis and solution...generally that is!

Hope this helps?

Mary

PS: EDIT:

I see Frank got to this before me!!! smile
In reply to Mary Evans

Re: Change in styles_color doesn't show

by Blair F. -
Picture of Particularly helpful Moodlers
The theme was created by an external contractor so I don't know anything about it. I'm attaching a screenshot of what I am seeing, so it's better understood.
Attachment Firebug_Screenshot_2.GIF
In reply to Blair F.

Re: Change in styles_color doesn't show

by Frank Ralf -
If the theme was created by a external contractor there might be some references to external stylesheets left in its HTML code, but that's just a guess.

Use Firebug to have look at the theme's HTML head section where external CSS stylesheet are included.

hth
Frank

In reply to Blair F.

Re: Change in styles_color doesn't show

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Are you sure this a:link and a:hover color #00A5E3 isn't coming from your own browser's setting?I had this problem once until I discovered what was happening.
In reply to Mary Evans

Re: Change in styles_color doesn't show

by Blair F. -
Picture of Particularly helpful Moodlers
Yes, I'm sure. The diagram in my previous message shows that it is coming from styles.php which pulls together the three files, styles_color.css, styles_fonts.css and styles_layout.css.

* I have done a complete search of my computer for files containing the text 00A5E3 and come up with nothing.
* I have disconnected from the Internet, so know that it is not pulling this information from anywhere other than my computer.
* I have temporarily renamed the styles_color.css file and then refreshed the screen to ensure that it is actually using that file, and proved to myself that it was. When the name was changed the hidden courses DID go grey and much of the rest of the theme changed, as well. When I change the name back, they all go blue again. HOWEVER...
* I have completely deleted the entire contents of the styles.color.css file and saved it. Cleared my browser cache. Closed my browser. Stopped Moodle. Restarted Moodle. Examined the element and AGAIN the 00A5E3 shows up.

I honestly have no idea where it is pulling this from and it's starting to drive me mental.

Thanks for trying to help!
In reply to Blair F.

Re: Change in styles_color doesn't show

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Are you sure it's not coming from standard theme? In Firebug you can click on the styles.php and see where the actual files are coming from. It give the URL. Normally it gives the name of your theme, but sometimes it can be calling the css files from Standard theme. If it gives the name of your theme then you can guarantee it's coming from that theme. I've done global checks on my PC and not found the file I want and know it is there.

Any chance you could upload a ZIP copy to see if I can mimic the problem?

Have we ascertained which theme it is yet?


Mary

Postscript in Edit Mode:
Could this problem be something to do with your Novell Network? From my experience Novell Networks are a law unto themselves!


In reply to Blair F.

Re: Change in styles_color doesn't show

by Frank Ralf -
Did you search case insensitive? Some browsers and/or tools might show #00A5E3 when there's #00a5e3 in the source code. Or they expand #abc to #AABBCC.

Better search for the CSS class, ".coursebox" in your case.

You might also use Web developer toolbar in addition to Firebug.

hth
Frank