Why don't we use dynamic (server-side generated) CSS?
        Posted  
        
            by 
                ern0
            
        on Programmers
        
        See other posts from Programmers
        
            or by ern0
        
        
        
        Published on 2011-11-05T13:29:29Z
        Indexed on 
            2012/09/17
            21:52 UTC
        
        
        Read the original article
        Hit count: 468
        
As server-side generated HTML is trivial (and it was the only way to make dynamic webpages before AJAX), server-side generated CSS is not. Actually, I've never seen it. There are CSS compilers, but they generate CSS files which can be used as static.
Technically, it requires no special libraries, the HTML style tag should reference to the PHP(/ASP/whatever) templater script instead of the static CSS file, and the script should send out CSS content-type header - that's all.
Does it have cache problems? I don't think so. The script should send out no-cache etc. headers. Is it problem for designers? No, they should edit the CSS template (as they edit the HTML template).
Why we don't use dynamic CSS generators? Or if there's any, please let me know.
© Programmers or respective owner