CSS Server-side Constants
By Chris on Aug 25, 2005 | In Development & Design, CSS, Programming | Send feedback »
For many years I’ve suffered with a gap in the current CSS implimentation: no support for variables or constants. These would come in handy if you have several classes, rules or id selectors that would all use the same style. Without this ability you have to update every instance if the style should change. Being able to use variables would mean that you could change these variables once for the whole site. This could of course be accomplished on the server-side, as has been proposed before, but this negates the benifit of being able to cache the page and speed up processing of the page. It also looks pretty messy as you have to jump in and out of your server side language and you have to force the page to be rendered as text/css by the browser.
This ability wouldn’t do much for smaller sites with only a few rules, but for large application-scale websites it could come in handy, expecially during the mock-up and development phases. Now a Baltimore based developer has come up with an easy way that works with Apache and PHP and still allows the page to be cached!
Trackback address for this post
No feedback yet
Leave a comment
| « document.getElementById() may return incorrect element in IE and Opera | Book Review: Maiden Voyage by Tania Aebi » |