[Seaside] least painful way to make my stylesheet *first*

Chris Cunnington cunnington at sympatico.ca
Wed Dec 12 22:13:47 UTC 2007

I don't understand why you want your CSS style sheet to come live from
Yahoo. Their YUI suite is great, but I don't see any need to access it using
a URL... Why not cut and paste into a file and put that in a Resources
folder? You want the URL to save the effort? To stay current?

Wait a second...Lukas does this. Or did this in 2.6. If you downloaded
Scriptaculous, and then disconnected your computer from the web
Scriptaculous couldn't render. It looked awful. Connecting your computer to
the web again, and it connected to the web, and a server in Bern provided a
css style sheet. In 2.6 it looked like this:

SUAllTests>>updateRoot: aHtmlRoot
    super updateRoot: aHtmlRoot.
        title: self title;
        linkToStyle: (self resources addToPath: 'style.css')

    ^ WAUrl new hostname: 'scriptaculous.seasidehosting.st'; addToPath:

Then a component could use "style" to detail itself further (i.e.
SUAutocompleterTest>>style). I think this meant that the the styles coming
from Bern would be first, as you need them. Of course, that's changed in
2.8. SUAllTests>>updateRoot: now doesn't look the same at all. Je me
souviens, as the Quebecois say.


"We're adding a little something to this month's sales contest ... "
> In my WAComponent-derived class, I tried adding:
> updateRoot: aRoot
> super updateRoot: aRoot.
> aRoot stylesheet url:
> Except that this put this CSS *last*, not *first*.  It needs to go first,
> because it wants to reset everything so that we get consistent behavior on all
> browsers.
> Drilling down, I see WAHtmlRoot has an "add:" but not an "addFirst:".
> I suppose I could subclass WAHtmlRoot and figure out how to get the new class
> to be my root.  But has anyone else run into this and has a less painful
> means, or a place I can hook from my WAComponent that can get to that "aRoot
> stylesheet" call early enough to be first in line?

More information about the seaside mailing list