Have you looked at Compass/SCSS? That introduces
variables/parameterization/mixins into a higher level CSS language that
then generates CSS that browsers understand. I've used it a bit and it's
quite powerful and you end up writing heaps less css even if you're only
managing the CSS for a single site.

http://compass-style.org

Regards,
Chris Colman
http://pagebloom.com


>-----Original Message-----
>From: Eric Hamel [mailto:dantehick...@gmail.com]
>Sent: Monday, 10 May 2010 10:17 PM
>To: users@wicket.apache.org
>Subject: Re: CSS Templating
>
>Good Point. In all honesty, I'm looking for a practical way to "skin" 2
>applications which are identical layout wise. Inherently, I don't want
to
>manage 2 different stylesheets as that will lead to maintenance hell.
>
>The idea was to build a Template implemented in both applications to
which
>I
>would override/pass to the template
>colors/background-colors/background-image. Might not be the best
>approach...
>
>On Sat, May 8, 2010 at 3:42 AM, Chris Colman
><chr...@stepaheadsoftware.com>wrote:
>
>> That method of css generation you propose would be generating CSS
(even
>> if it were into a separate .css file) with each page render. If
you're
>> dealing with a lot of CSS that probably isn't the most efficient
method.
>>
>> Generating CSS at render time would mean the browser could not take
>> advantage of CSS caching - which would be bad in these days of quite
>> large CSS files.
>>
>> You might be better off considering a separate CSS generator that
>> doesn't generate CSS at 'page render time'.
>>
>>
>> >-----Original Message-----
>> >From: Eric Hamel [mailto:dantehick...@gmail.com]
>> >Sent: Saturday, 8 May 2010 5:52 AM
>> >To: users@wicket.apache.org
>> >Subject: CSS Templating
>> >
>> >All,
>> >
>> >I've been exploring the use of TextTemplateHeaderContributor.forCss
>> method
>> >to build a CSS template for multiple application.
>> >
>> >Take for example:
>> >
>> >IModel<Map<String, Object>> model = new
>> >AbstractReadOnlyModel<Map<String,Object>>(){
>> >
>> >private static final long serialVersionUID = 1L;
>> >
>> >@Override
>> >public Map<String, Object> getObject() {
>> > HashMap<String,Object> map = new HashMap<String, Object>();
>> >map.put("body-bgcolor", "red");
>> > return map;
>> >}
>> >
>> >};
>> > add(TextTemplateHeaderContributor.forCss(WelcomePage.class,
>> >"Template.css",
>> >model));
>> >
>> >with CSS template:
>> >
>> >body{
>> >
>> >background-color: ${body-bgcolor};
>> >
>> >}
>> >
>> >
>> >
>> >The output works. However, the template is contributing to the
header
>> in
>> >the
>> >form of:
>> >
>> ><style type="text/css"><!-- body{ background-color: red;
}--></style>
>> >
>> >which is unacceptable. Is there a way to generate a .css file to be
>> used by
>> >the application ?
>> >
>> >Thank you
>> >
>> >--
>> >Sent by Eric Hamel
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>--
>Sent by Eric Hamel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to