[Seaside] Re:using CSS for default Magritte-Editors

Stephan Eggermont stephan at stack.nl
Thu Mar 14 12:58:22 UTC 2013

Hi Stefan

It mostly is a good idea to keep the css reasonably static and in one or a few files
That allows caching and reduces the number of roundtrips needed for the page 
to load.

In Magritte there are many ways to achieve this, depending on where you want
the responsibility to be. You could override the componentClass and override
the edit:. At a certain point you might want a custom form renderer.

 In the few cases where I've needed custom css, I also had a custom
component where I could render the css inline, or do a calculation trick:

canvas div
	class: 'column kols',nrOfColumns asString;

with in the css

	width: 100%;
	width: 48%;
	width: 32%;


Any specific reason you're not using the shorthand
        classes: #(HistorieArbeitsbereiche);
        accessor: #historieArbeitsbereiche;

More information about the seaside mailing list