[Seaside] Re: CSS/JS libs
Avi Bryant
avi at beta4.com
Tue Jun 22 22:11:32 CEST 2004
On Jun 22, 2004, at 12:37 PM, rrobbes wrote:
> Hi Avi,
> Would this have any incidence on CSSs generated dynamically ?
> I have for example some components whose font size
> vary roughly with their nesting level in the component tree.
> Romain
I don't think it's generally a good idea to generate CSS dynamically.
It's friendlier to both your designers (in terms of editing) and your
browser (in terms of caching) to keep the CSS static. What I would do
in your case is have dynamic class attributes instead - you can have a
surrounding div around your components whose class indicates the
nesting level, and then several versions of the styles scoped to that
class:
.root .foo {/* big font*/}
.nested .foo {/*small font*/}
.deeply-nested .foo {/* tiny font */}
Avi
More information about the Seaside
mailing list