Skip to main content
CSS question Started by Jorin · · Read 6747 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

CSS question

Let's say, I have this code in the CSS file of my theme:

Code: [Select]
.codeheader, .quoteheader {
border: 1px solid #ccc;
border-bottom: none;
background: #fff;
color: #464646;
}

And in my custom CSS file I have this:

Code: [Select]
.codeheader, .quoteheader {
color: #383838;
}

What will happen? Will the default CSS file be used and only the color will change because of my custom CSS file? Or will the values for the border and the background be forgotten because they are not in my custom CSS file?

I think the only way using the custom CSS file will be if the system keeps the old values and only changes the color in this example! If it not works like this, the custom CSS file leads to problems and should not be used! Why?

I have changed a lot of colors of the default theme and use a custom CSS file for this changes. Into my file I copied all codes where I wanted to change the color, with all values of this codes, even if they aren't for the colors. Attached is my custom CSS file for better understanding. Works fine, till the update 1.0.5 came and with it some changes for the CSS file. The package manager altered my default CSS file, but because I am using a custom CSS with lot's of code inside, the changes don't work with my themes. So I don't have the small home button in the breadcrumb for example, even with 1.0.6 I am using now.

So what helps would be a system where the default CSS codes are used and then (!) my custom CSS codes will be read and overwrite the default values. So I could only have color changes in my custom CSS file.

Re: CSS question

Reply #1

The rules are cascading. In other words, the only thing that will change is the color.

Re: CSS question

Reply #2

Really? Thank goodness, that helps a lot. Now I have to edit my custom css file. Thank you!

Re: CSS question

Reply #3

Quote from: Joshua Dickerson – The rules are cascading. In other words, the only thing that will change is the color.

You were right (of course)!  :)  I merged my custom_light.css with index_light.css and deleted all the rows that are the same. And it is working (of course), nearly perfect. I had to save some codes in both files to solve some problems with colors, don't know why. Strange.

Thanks a lot!  :)

Re: CSS question

Reply #4

You have the newest file around? :)

Og this is not the Social theme, anyone have a color file custom thing for social?