[Seaside] CSS style not applied until reload
p3anoman at gmail.com
Wed Apr 14 00:37:28 UTC 2010
On Tue, Apr 13, 2010 at 8:19 PM, Nevin Pratt <nevin at bountifulbaby.com>wrote:
>> 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 even needed.
I agree although if you're as terrible at css as I am, hunting through
methods to change pixel counts and the like can be arduous, so having all
the CSS in one spot is a bit more convenient.
But in Sigrid's case the inline CSS isn't working because the client isn't
updating according to the formatting returned with the Ajax response. Those
styles need to be in the head section beforehand, so either WAFileLibrary or
external files are required.
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside