[Phpwm] Site Structure

Iain Wallace iain at strawp.net
Sat Dec 10 17:50:52 GMT 2005



Greg Morley wrote:
> Not exactly on-target with this, but related to the theme of the current 
> thread:
> 
> "Defining CSS constants using PHP" : http://tylerhall.ws/css/constants/  
> (via digg.com)
> 
> Pretty useful.
> 
The VLE software Moodle actually does that in its templating system so 
that the user can define colours through the database. It's useful if 
you're making something from scratch, but if you're maintaining someone 
else's code and they've not named their variables very well [1] then it 
can end up being easier just to remove them and hard code in the CSS 
instead.

[1] e.g.

variables like:

$tricycleOrange = '#F33500'
$blue = '#346FB7'

;)

So I want the thing that used to be blue to be pink in the stylesheet. I 
either have to store the code for pink in a variable called "blue" or 
just rip out the variables to preserve sanity.

Better variable names:

$primary
$secondary
$primary_background
$secondary_background

etc.

Cheers,
Iain



More information about the Phpwm mailing list