Hi all,
I hate it to look up the codes of colors to know what color is used. So I would like to use a constant on each place a color is used. That is easy peasy:
$blue='#369'; $green='#363'; $lgreen='#cfc'; […] ul#navigation{ background:$blue; color:#fff; }
But now I want to use it inside my templates, which span several pages (I like to have template for each subtask in my CSS, for example one for my menu). How should I combine the two?
Put the color constants before the import statements? Can I then use the color constants in the subtemplates, because the browser will load all, and see only one big template?
$blue='#369'; $green='#363'; $lgreen='#cfc'; @import url("navigation.css"); @import url("menu.css"); @import url("header.css");
Anyone know the answer?
TIA,
Michel
Have you tried that then? to
Have you tried that then? to see if it works?
Stylesheets are processed by the browser the server just sends them by request along with the html they aren't opened and embedded as an include would be.
You're going to need to change the css files to php ones so that can process script and will need to generate headers sending the correct css mime type
Moving to 'Off Topic' not really a css question
If you don't mind a very
If you don't mind a very limited palette then you can use colour names instead of hex values e.g. color: red;
The php elements you refer to are variables, not constants. There is a big difference