Background
I'm developing my own OOP content management system in PHP for fun and to expand my programmig knowledge
What I've got
I've got the main framework set up, users can login to the backend, add pages, edit pages, set up content in rows or columns, add logo's, billboards, etc.
Expantion
My next venture is to allow users to modify the style of their website through the panel. including header colours, font size, font family, etc
How to Implement
I thought of a number of ways to do this, but i wanted to ask the community to see if they can come up with a better solution or justify one of my solutions.
Idea 1:
I could write/find a php class that parses a css style sheet, and then re-writes it as the new style sheet with the editted values
Idea 2:
I could separate the existing style sheet into structure, colors, fonts, etc, and just allow the user to modify the colors and fots separately.
Idea 3:
I could ditch the whole separating style from content idea, and make php to write the user specified styles right into the html...
Information
Does anybody have any other methods they could think of?
If not which one of mine would work best/be most efficient/optimal etc
This is not a discussion, I'm asking a specific programming question.
I understand that the panel must have an interface for the user to change the values and save their configuration in a Database OR save their configuration directly in the new css file.
I'm just not sure which way would be the "best" way.
How would 'you' do it?