2007/4/6, Lukas Renggli <[hidden email]>:
> > 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 > > > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> > 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? Yes it is scoped globally (that's a CSS thing), but it is only included when the particular component is visible on the page. That's one of the reasons we never use it, it is hard to predict what the CSS does in the end effect ... Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/4/6, Lukas Renggli <[hidden email]>:
> > > 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? > > Yes it is scoped globally (that's a CSS thing), but it is only > included when the particular component is visible on the page. That's > one of the reasons we never use it, it is hard to predict what the CSS > does in the end effect ... Where visible means accessible from the root component (indirectly) via #children and not #call'ed. Visible doesn't mean rendered, right? Philippe > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Where visible means accessible from the root component (indirectly)
> via #children and not #call'ed. Visible doesn't mean rendered, right? It uses the standard traversal method #visiblePresentersDo: walking trough the decoration chain: if there is a delegation (#call:) into the delegate, else into the declared children (not necessarily the actually rendered ones. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |