Chris Withers wrote:
Dylan Jay wrote:
disadvantage that the css is no longer valid once templated. ZPT of course
would be the solution if CSS was XML, but alas :(
I think ZPT is just fine for generating CSS. It coudl do with a plan text mode, like it has an HTML and XML mode, but apart fro mthat, it rocks :-)
Stylesheets should always be static documents, a dynamic stylesheet defeats browser caching
Not if the dynamism is based on user preferences, and if the cache-control headers are set appropriately; in that case, the browser (but not intermediate proxies) will still be able to cache the page.
and destroys the advantages over just inlining all the presentation markup. If you want to have dynamic style, you should use dynamic cascading & inclusion instructions, but the stylesheets themselves should remain static. As such, generating style in ZPT is a complete waste of time and effort. The File object is a much better fit.
Overall, I agree with you that stylesheets are best kept static. However, consider what happens to cacheability when the URLs of of images referenced in a document are relative; the same problem can afflict stylesheets, particularly in a setup where virtual hosting is in play.
Tres. -- =============================================================== Tres Seaver [EMAIL PROTECTED] Zope Corporation "Zope Dealers" http://www.zope.com
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce