I can't get what you really want, or the way you want to do it. But i'll try to guess.
If you wan't to change or override some css class property you can use the html syle attribute. Perhaps something like this in your template: <div jwcid="@Any" class="baseClasss" style="ognl:getStyleForMe('thisIsAParameter', 'andThisIsAnother') /> And in your page class or it's superclass you define the method: public String getStyleForMe(String param1, String param2); It's the simple approach, obviously. Also, you can define a servlet or an engine service and include a <link rel ...... to that servlet or service url, and in it's service method you can do some logic to output a css with the classes you want created dinamically. I don't like this approach. I like to keep things simple. On 5/20/05, David Leangen <[EMAIL PROTECTED]> wrote: > > Hi, Random Tapestry User, or tappapp, whichever you prefer... > > > > It would be nice to be able to dynamically generate CSS. Is > > > there a (simple) way this could be done? > > > Ideally, you probably have an "images" directory that is probably a > > peer directory to your "css" directory. > > > Sorry that my question was not so clear. > > You gave the example : > > .titleGradient > { > text-align: top; > background: url(../images/title-gradient.gif) 0px 0px repeat-y; > } > > > But what if I want "text-align: top" in one case, but "text-align: bottom" > in another? > > Now, I know very well I could have two classes, like "titleGradientTop" and > "titleGradientBottom", and set the class being used dynamically. The problem > with this is that it clutters up the CSS. If you think about all the > possible combinations of styles, it's just not practical. It just seems so > much elegant and useful to be able to generate the CSS dynamically. > > > It would be very useful to be able to do something like: > > public void setTitleGradientCssClass(final Object testParam) > { > > if ( testParam.isSomeTestTrue ) > { > getCss().getText().setAlign(TOP); > | > else > { > getCss().getText().setAlign(BOTTOM); > } > > } > > > Cheers, > Dave > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]