Magritte CSS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Magritte CSS

Ramiro Diaz Trepat
Hello fellow Seasiders,
   I wanted to ask which was the easiest way to set CSS class or ids
on Magritte generated forms to configure the wey they look with CSS
scripts.
   Thanks

   r.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Magritte CSS

Lukas Renggli
>    I wanted to ask which was the easiest way to set CSS class or ids
> on Magritte generated forms to configure the wey they look with CSS
> scripts.

You might want to set attributes (#class:, #id:) that will be used for
the form fields in the attributes of the description. Or you could
create a custom renderer. Or a custom container/field component.

The most cool Magritte froms I have ever seen can be enjoyed at
http://www.juniorwebaward.ch.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Magritte CSS

Ramiro Diaz Trepat
All right...
So in the first case you mention, I could use something like:

(MAStringDescription ...... )
    attributes addClass: 'myStringClass';
....

I will try that later today.
Lukas, the usage of these 3 methods of customization you mention, are
only a matter of taste or is there a suggested context for each.
Do you have brief examples you could send us?
Thanks.

r.


On 5/7/07, Lukas Renggli <[hidden email]> wrote:

> >    I wanted to ask which was the easiest way to set CSS class or ids
> > on Magritte generated forms to configure the wey they look with CSS
> > scripts.
>
> You might want to set attributes (#class:, #id:) that will be used for
> the form fields in the attributes of the description. Or you could
> create a custom renderer. Or a custom container/field component.
>
> The most cool Magritte froms I have ever seen can be enjoyed at
> http://www.juniorwebaward.ch.
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Magritte CSS

Lukas Renggli
> All right...
> So in the first case you mention, I could use something like:
>
> (MAStringDescription ...... )
>     attributes addClass: 'myStringClass';
> ....
>
> I will try that later today.

Exactly, that is probably the simplest way to customize the CSS. The
registration form on www.juniorwebaward.ch is an example of such a
customization.

> Lukas, the usage of these 3 methods of customization you mention, are
> only a matter of taste or is there a suggested context for each.
> Do you have brief examples you could send us?

The custom renderer is useful when you want to use a different but
reuseable technique to display the form elements, e.g. to replace the
table with a definition list enumeration. The class MACssRenderer is
such a custom renderer (I just notice that it has a stupid name).

The custom component is useful when you want to have an unique editor,
e.g. you want to place every form element and label exactly within a
complicated layout. The login-form on seasidehosting.st is an example
for such an component.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside