Friday, April 24, 2015

Re: LESS/ SASS/... style usage in GWT ?

I would probably just serve the CSS using a servlet that fetches the CSS from database based on the current customer. The app would then have a small UI to update the CSS in the database.

If you don't need to give customers full control but just want to allow them to change logo / colors then I think you can also use CssResource runtime evaluation. That is you would define

@def APP_BACKGROUND_COLOR eval("com.example.app.client.resource.Branding.getBackgroundColor()");

and then use APP_BACKGROUND_COLOR throughout your CssResource styles. To make Branding.getBackgroundColor() return the correct value for a given customer you would load that information from your server and set it on the Branding class before you inject the CSS. In your app UI you would then have a simple text box where customer can change the CSS hex color.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment