[Seaside] Re: Print and Screen CSS

Yanni Chiu yanni at rogers.com
Tue Jan 18 23:24:49 CET 2005

Jason Rogers 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" />


html attributes
    at: 'rel' put: 'alternate stylesheet';
    at: 'type' put: 'text/css';
    at: 'title' put: styleName;
    at: 'href' put: '/css/', cssName, '.css'.
html headTag: 'link'

But, I had to override #renderContentOn: to add the above code,
before invoking "super renderContentOn:", otherwise the link tag
won't appear in the <head> section. (Seaside 2.3 version, by the way.)

Notice these are static CSS files. I don't know how you'd get
Seaside to output multiple sets of dynamically generated styles.

HTH. --yanni

More information about the Seaside mailing list