[Seaside] Re: don't I have to configure ...

Philippe Marschall philippe.marschall at gmail.com
Fri Apr 6 09:08:03 UTC 2007


2007/4/6, Lukas Renggli <renggli at iam.unibe.ch>:
> > I would like to know whether the following is correct:
> >
> > - when I want to serve a picture I do not need to associate the
> > fileLibrary with my application.
> > Since I refer directly to the file using
> >       html image url: (WACounterLibrary default urlOf: #scgPng).
>
> Correct.
>
> > - now to make sure that the image and css can be referenced in css
> > style sheet I have to
> >       - change the selectorsToInclude and add the library to the
> > application
>
> #selectorsToInclude will be used to generate the HTML head of the
> applications that habe been added to the library.
>
> > I have a question how can I choose a given css if I have two in my
> > file library
> > I have
> >
> > selectorsToInclude
> >       ^ #( scgPng screen2Css screenCss)
>
> scgPng doesn't need to be in selectorsToInclude. It is not meaningful
> to add a PNG to the HTML head. If you add the library to the
> application something like the following will be automatically added:
>
>    <style type="text/css" media="screen" src="/seaside/files/library/
> screen2.css">
>    </style>
>    <style type="text/css" media="screen" src="/seaside/files/library/
> screen.css">
>    </style>
>
> Check out the actual output to be sure.
>
> > I saw that WAStandardFiles has several Css
> >
> > selectorsToInclude
> >       ^#(
> >               basicsCss
> >               kalseyTabsCss
> >               sourceStyleCss
> >
> >               externalAnchorsJs
> >               miscJs
> >               shortcutsJs
> >       )
> >
> >
> > so how can I associate a style using the following....?
> >
> > style
> >
> >       ^ WACounterLibrary default screenCss
>
> Assuming that #style is a method in a WAComponent, then the answer is
> yes, this works. However this is not ment to be used like this (well,
> the idea is not too bad, I've just never seen it used like this).
> Usually instances of WAFileLibrary are global to whole applications.
> If you need specific styles with a single component you can put them
> there (but that again is rarely used).

The CSS returned by #style isn't really scoped to the component, is
it? It's a global CSS (added to the document head) applied to every
element of the page, right?

Cheers
Philippe

> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>
>


More information about the Seaside mailing list