Thursday, September 18, 2014

Re: Reskinning a GWT application that uses ClientBundles and CssResources



On Thursday, September 18, 2014 11:00:13 AM UTC+2, matt tate wrote:
Hello all,

We've a large GWT app that relies heavily on UiBinder for layout and ClientBundles and CssResources for style. We are now faced with a company rebrand that requires us the change the fonts, images and colour schemes for the entire app. In addition, a lot of our basic styles are duplicated across Views and Widgets, which means we essentially have a collection of sudo-webcomponents that are highly portable but very hard to change as a group.

Has anybody had any experience of re-skinning an app that's structured like this? Would we be better moving to global css rules that can reap the benefits of LESS or SASS?

Rather than moving to "global css rules", how about sharing what needs to be shared through constants? Put all your constants as @def in a file, and then make sure you include that file everywhere you need it by referencing it in your @Source annotation (or src="" attribute in UiBinder's <ui:style>).
If those constants need to be shared by different projects, just put the file in a JAR or folder that you can reference in the classpath of each project that needs it: GWT doesn't care where the file comes from.

I'd also suggest moving to GSS (through https://github.com/jDramaix/gss.gwt for now, but it'll be built in GWT 2.7) so you can use mixins.

--
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