Reputation: 134653
Hey, I'm trying to set variables in my CSS so that I can allow subscribers to customize the colors of their page. I'd rather have as many files on my static server as possibly.
Is there a good / easy way to do this? Should I just have a CSS file containing all the editable parameters in a CSS file inside the application?
Walker
Upvotes: 0
Views: 342
Reputation: 25685
There are a few different ways you could do this:
This goes in your site's .htaccess file (tells the server to look for PHP in CSS files):
AddType application/x-httpd-php .css
This goes at the very top of your CSS file so browsers treat it as a CSS file:
<?php Header ("Content-type: text/css");?>
Upvotes: 5