Method One: On Component Accessors
- Don't edit CSS or Smalltalk in the web browser!
Method Two: File Libraries
Both of the previous methods create an include in the HTML document head, pointing to a dynamically generated cachable URL like so...
- Don't use libraries for CSS, I know it'll work, just don't do it, unless of course the developer is the designer and you don't mind keeping your CSS in Smalltalk.
Method Three: File Includes
CSS belongs in *.css files on the disk, where a designer can easily use his existing tool set, whatever that may be, to edit the files directly. This keeps the programmer and the designer squarely in their respective comfort zones, using tools of "their choosing", to edit "their" code. Even if you don't have a designer, and you edit the CSS yourself, it's a much easier task to do with a real editor on a real file.
This method is simple to use, just override #updateRoot: on your component and link to the files like so...
This will generate...
in your head tag, just as you'd normally have done in any other web framework.
Just because everything "can" be put into Smalltalk classes, doesn't mean it should be. Sometimes Seaside features and flexibility lead one down the wrong path and make you think you "have" to do everything differently than you used to. But Seaside is fully capable of doing most things several ways, including the old fashioned way, when it's the pragmatic alternative.
As with most things in programming, context means everything, and which method you choose depends on the circumstances at hand, so choose wisely.