If you like the Showcase theme then you can simply use the Clean.gwt.xml 
theme in your module.

What I do to change the GWT style globally the way I want is to copy the 
GWT style into a ClientBundle and only inherit 
"<theme-name>Resources.gwt.xml" so that images get copied to the war folder.

For example I have:

BaseClientBundle extends ClientBundle {
  @Source("reset.css")
  CssResource resetCss();

  @Source("gwt.css")
  @NotStrict
  CssResource gwtCss()
}

As the names imply my "reset.css" resets HTML elements to my desired 
defaults so they look the same in all browsers, e.g. no border for img 
tags, same margins/paddings for h1-6, fonts, etc. 

In "gwt.css" I have copied one of the GWT themes so I can modify things 
easily. When you have inherited for example CleanResources.gwt.xml then all 
images are copied to the war folder but its very likely that the URLs for 
these images inside "gwt.css" are wrong now and you have to correct them.

In onModuleLoad() or your very first "shell" view you simply call 
baseClientBundle.resetCss().ensureInjected() and 
baseclientBundle.gwtCss().ensureInjected() to activate both.

Doing so has the benefit that GWT CSS is now embedded in your JS code, so 
you save one server request when the app loads. Also you can remove some 
CSS hacks if you dont support IE6/7 anymore. 

-- 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+unsubscr...@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to