What is the preferred way to associate css styles with GWT widgets (using UiBinder)?

Posted by smallbec on Stack Overflow See other posts from Stack Overflow or by smallbec
Published on 2010-06-08T23:06:35Z Indexed on 2010/06/08 23:12 UTC
Read the original article Hit count: 268

Filed under:

From the GWT page (http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html#cssfiles), it mentions 2 ways (for modern application):

  • Using a CssResource contained within a ClientBundle.
  • Using an inline element in a UiBinder template.

Modern GWT applications typically use a combination of CssResource and UiBinder.

So my question is, when should I use a css file and create a CssResource for it, and when should I define styles directly in the ui.xml file using <ui:style>? Are there any performance implication (i.e. resource size to download on the client) with either of these ways?

© Stack Overflow or respective owner

Related posts about gwt