[Seaside] Print and Screen CSS

Brett Taylor brett.taylor at healthauditors.com
Tue Jan 18 23:56:21 CET 2005

I just asked Rado last Friday on IRC  about this.  Initially I was going to change how Seaside handles the style documents, but I discovered the way I previously handled print style sheets was over kill.  In the past, with another framework, I had a separate style sheet for print vs. the screen.  My main purpose for the print style was to hide elements like menus, and bread crumb trails.  What I found this week end was that to do this it was easier to handle this in the main style sheet using style media rules.  Here is a bit of my style method text:

@media screen {
		#left-navigator { width: 15em; }
@media print {
		  #left-navigator { display: none}
@media print {
		  #nav-trail { display: none}

This may not meet your needs, but it helped me with my project.  The style handling code should probably be refactored so that it will support styles for more than media type, but for now, the above works for me.
On Mon, 17 Jan 2005 11:45:02 -0500, Jason Rogers <jacaetevha at gmail.com> wrote:

> I would like to define a separate CSS for printing and display.  In
> static pages I would do something like:
>   <link rel="stylesheet" type="text/css" href="screen.css" media="screen" />
>   <link rel="stylesheet" type="text/css" href="print.css" media="print" />
> In Seaside we have the WAComponent>>style or WADecoration>>style
> methods, but that is always for screen media.  Is there a way to
> define the print styles?
> Thanks.

More information about the Seaside mailing list