So I have a stylesheet that i've written in PHP as well as a settings file that is included at the top of the stylesheet and holds some variables and functions that define some of my css properties. For example:
// Background color for body element
// Type: String
$bodyBGColor = 'rgb(67,142,169)';
// Has background Image for body element
// Type: Bool
$bodyBGIMG = false;
function hasBGIMG(){
if($bodyBGIMG){
echo "url(../img/".$adPrefix."_BG.png) !important";
}else{
echo " ";
}
};
In the CSS I use the hasBGIMG() function.
body{
background-color: <?php echo $bodyBGColor.' !important' ?>;
background: <?php hasBGIMG(); ?>;
}
The first time I created and used the function it worked great, but when I change the value of $bodyBGIMG to true the CSS files still shows the value for false.
Here's the output in the css file:
body{
background-color: rgb(67,142,169) !important;
background: ;
}
I have other functions in the file that behave the same way. I can even add new variables and functions to the file and they get parsed properly and yet any old functions keep their old values.
Any thoughts on why the function isn't looking at the updated variables or why the stylesheet is keeping the old values?
Thanks