OsakaWebbie
Programmer
I'm setting up an online application that will have a single codebase for ease of development, but separate client databases. I want to keep most of the CSS in the common spot, because as I add features I'll need to add to the CSS files also - I only want to have to do that once instead of over and over for each client. But I would like to be able to offer each client their own logo and matching color theme - logo is no problem, but colors pervade all through the CSS (the same few colors being used for many different types of objects), so I don't see how I can keep things consolidated.
Ever since I started working with CSS, I have wished for the ability to define my own color constants. There are predefined ones like "White", "DarkRed", "LightSteelBlue", etc., but if I could define additional ones, like "PrimaryDark", "SecondaryHighlight", etc., I could simply define them in the client's file and use them in the common file. But there is still nothing like that, right?
Does anyone have an idea of how I can organize my CSS to allow color choices but still have my styles somewhat consolidated? The only way I can think of is to keep the colors in a database table and have PHP build the CSS right into the page output (<style> tag), but then I lose the speed of a CSS file that can be cached.
Ever since I started working with CSS, I have wished for the ability to define my own color constants. There are predefined ones like "White", "DarkRed", "LightSteelBlue", etc., but if I could define additional ones, like "PrimaryDark", "SecondaryHighlight", etc., I could simply define them in the client's file and use them in the common file. But there is still nothing like that, right?
Does anyone have an idea of how I can organize my CSS to allow color choices but still have my styles somewhat consolidated? The only way I can think of is to keep the colors in a database table and have PHP build the CSS right into the page output (<style> tag), but then I lose the speed of a CSS file that can be cached.