I want to generate a CSS file based on the users choices.
I am considering which way would be best. On example is to use arrays and save them in a XML file or use a key/value store like Mongo DB.
In that way the array can be pulled from the XML or key/value database, modified and saved. After that a CSS file would be generated based on that data. That is to ensure that the CSS file always would be created correctly.
MySQL seems to be clumsy at storing that arrays unless I use EAV. that is why I mention key/value database like mongo DB.
The reason for all this are that I just want to make a nice user interface where user witout CSS knowledge can generate their own theme.
I just want to present the user with a form where they can fill out color, width etc.
What do you think would be good?
Example of array:
$css = array(
'body' => array(
'font-family' => 'arial',
'font-size' => '12px',
),
'wrapper' => array(
'margin'=> '20px auto 20px auto',
'width' => '900px',
),
'content' => array(
'background-color' => '#c3c3c3',
'width' => '900px',
),
);