Last Updated: February 25, 2016
·
2.029K
· dannyoutlaw

Create a PHP/CSS file

//Change to appropriate global variable
<?php global $authority; ?>

<style type="text/css">

//Basic CSS can go in here if need be. 
body.custom-background {
background-color: white !important;
}  

//Example of PHP creating CSS
<?php if($authority['center-logo'] == '1') { echo "#logo img {margin: auto;}"; } ?>

</style>

1 Response
Add your response

Not really a best one. You could generate the file by cron and then just include it with the link tag, as usual. This way the CDN can be used, for example.

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside