I am a great believer in writing what I term 'dynamic' code; PHP and MySql together allow us to do this; with the help of CSS and Javascript at times.
CSS is now commonly used for just about any web function imaginable; to define fonts, lists, panels etc. etc. Like most developers I am a big fan, and using PHP and MySql I have written the code to enable me to build CSS files for many such functions.
The first task is to build the MySql tables to store the information required to build a particular type of CSS file. For example purposes let's look at building a CSS file that defines the different fonts we might like to use.
This requires just one table which we will name 'fonts'. The fields within this table will include exactly what you would expect - font-family, font-weight, font-size etc.
We now need a piece of code to enable us to create and edit the font details. A final piece of code is required to build the 'fonts.css' file using the information in the 'fonts' table. To view the resulting file for this website click here.
Another common file I build defines the standard <h1> to </h6> and <p> tags which you can view here.