[Seaside] CSS style not applied until reload
nevin at bountifulbaby.com
Wed Apr 14 00:19:00 UTC 2010
> I hope there's another solution, other than external style
> sheets, because as I peruse my 44 #style methods in my
> package, I rediscover that I need to dynamically calculate
> some widths and heights, so in some cases I need to implement
> styles based on individual instances.
> Do people ever combine external style sheets and #style methods?
> I realize the down-side of not having external style sheets, but
> having *everything* in the Smalltalk environment sure is a
> hard-to-resist and very sweet siren song of convenience. Putting
> everything in the image gives you refactoring ability, plus a
> whole bunch more.
> But it also means having *no* external style sheets-- instead
> leaving you with having *all* of your style info inside the
> Smalltalk image.
> And, it's a siren song I find myself succumbing to more and more.
> So, yes, some people do in fact combine external style sheets and
> #style methods. :-)
> And, yes, doing so does have a down-side.
> But really, a few lines in a WAFileLibrary method isn't truly an
> "external" style sheet and not much of a down side is it? Does it use
> that much server resources? Won't the client agent cache the bits?
> Seems a lot less cumbersome than all that Apache stuff.
> Still the calculated measurements might require a kludge. Perhaps a
> calculated class would do the trick if the calculation results in a
> discrete and small number of outcomes.
Why even do that, then?
It depends on who you want to have the ability to modify a CSS style:
(1) a graphic artist, or (2) a Smalltalk programmer.
If the answer to that question is that it is fine having it be the
Smalltalk programmer who modifies the CSS (which, in effect, this
decision also defines much of what the downside is), I personally think
the #style methods are the most convenient, and nothing else is really
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside