How to include a <style media="print"....> CSS file?
Hi, I'm currently to make my application printer-friendly, thus I'd like to include a print-CSS file. Currently, I include CSS-files like that: -------------------------------------------------------- <resourceLibrary name="bspskin-lib" layer="zbsp.skin.interfaces.IBSPLayer" > <directory source="lib" include="base.css" /> </resourceLibrary> -------------------------------------------------------- This creates the following code: -------------------------------------------------------- <style type="text/css" media="all"> <!-- @import url("http://localhost:8088/BSPSite/act/@@/bspskin-lib/base.css"); --> </style> -------------------------------------------------------- What I'd like to have now is to include some other CSS-file with media="print". The zc.resourcelibrary code seems not to be able to handle this, so I'm curious how to do this: 1) Simply write this directly into my page template 2) Hack zc.resourcelibrary, e.g. add a ZCML-directive "media" 3) Use some other package I'm unaware of Any suggestions? Best Regards, Hermann -- hermann@qwer.tk GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7
Hey, Hermann Himmelbauer wrote: [snip]
1) Simply write this directly into my page template 2) Hack zc.resourcelibrary, e.g. add a ZCML-directive "media" 3) Use some other package I'm unaware of
hurry.resource (an improved take on zc.resourcelibrary's idea) can't do this right now either, but I suspect it's more hackable than zc.resourcelibrary. Let me know if you want to hack on it. Regards, Martijn
On Mon, 2009-05-25 at 15:48 +0200, Hermann Himmelbauer wrote:
Hi,
[...]
What I'd like to have now is to include some other CSS-file with media="print".
The zc.resourcelibrary code seems not to be able to handle this, so I'm curious how to do this:
1) Simply write this directly into my page template 2) Hack zc.resourcelibrary, e.g. add a ZCML-directive "media" 3) Use some other package I'm unaware of
Any suggestions?
4) Just have it included as is and add the following section: @media print { @import url (print.css); } -- Christian Theune · ct@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1 Zope and Plone consulting and development
participants (3)
-
Christian Theune -
Hermann Himmelbauer -
Martijn Faassen