[Seaside] #children problems
Avi Bryant
avi.bryant at gmail.com
Wed Oct 18 19:56:48 UTC 2006
On Oct 18, 2006, at 12:45 PM, Joseph Blatter wrote:
> I'd need my controls to be components because I want
> to attach a custom css style to each control. I've
> tested your suggestion but I've seen the renderer take
> the style from the childrens
> (WARenderer>>buildDocRoot), making impossible to get
> my custom styles ever called.
>
> So it's still possible to get the #style called being
> a control not a children of the page?
I'd recommend against doing anything dynamic with CSS. In fact, I'd
recommend against using #style at all. Instead, set up a static
stylesheet somewhere that has a CSS class for each possibility, and
dynamically assign the right class to your controls. If you really
need to do something like compute a width, use a style attribute
(html div style: 'width: 100px'; ...).
Does that help?
Avi
More information about the Seaside
mailing list