Remember: elements can have several style classes. Since the layout remains static and will be separated from the coloring, you want to define the classes for the layout and color separately, in completely different files.
So what do you want to do for the themes, set several colors in a separate css file as follows:
.DefaultBackgroundColor { background-color: white; } .PrimaryColor { background-color: #123456; } .PrimaryAsForeground { color: #123456; } .AccentColor { background-color: #654321; } .AccentAsForeground { color: #654321; } .ComplementColor { background-color: #333333; } .ComplementAsForeground { color: #333333; } .DefaultTextColor { color:black; } .HighlightTextColor { color:black; font-style:bold; } .ComplementTextColor { color:white; }
You can add more colors, but you get the idea. Then in your HTML you add these classes to the elements in addition to the layout classes. For example, using these classes, you can overlay the Nav buttons for StackOverflow as follows:
<div class="nav ComplementTextColor"> <ul class="primarynav"> <li class="PrimaryColor"><a href="/questions">Questions</a></li> <li class="ComplementColor"><a href="/tags">Tags</a></li> <li class="ComplementColor"><a href="/users">Users</a></li> <li class="ComplementColor"><a href="/badges">Badges</a></li> <li class="ComplementColor"><a href="/unanswered">Unanswered</a></li> </ul> </div>
Obviously, these colors are made up and will not work together, but that the beauty of it is customized. This makes it easy to play and customize colors, since you don't need to define the same color everywhere. You install it once, and then you only need to make a very small number of changes to completely repaint the site.
The downside is that you are limited. For example, using the html that I posted, you couldn’t go and make the buttons here a different color from everything else, just changing the css file, because we did not configure a “hook” for it. But you can change this ugly orange color that they use here through one right edit.
source share