dimanche 7 janvier 2007
PHP-generated CSS magic
Par Daniel, dimanche 7 janvier 2007 à 20:54 :: Web design
I would like to share my new experiments concerning CSS, and how it can be used with a server-side scripting language like PHP.
What frustrates me the most when I write stylesheets is the amount of repetitive work that has to be done by manually. Because there is no support for variable or constants in CSS, you are often forced to copy/paste values across your stylesheet, and make lots of calculations "by hand".
A simple example: If you want to change the width of a column, you often have to change the width of others elements in various places of your stylesheet, which can be tedious and prone to errors.
Wouldn't it be better to have these values computed automagically ?