So far I’ve accounted for four (4) different places where a GWT developer can inject CSS into a web application:
- Inside an HTML host page, you can place an HTML link to an external stylesheet, such as having
MyWebApp/war/hello_gwt.htmlcontaining the following line:
<link type="text/css" rel="stylesheet" href="mywebapp/webModule.css">
- Through the use of implementing
ClientBundles that give your app access to binded
- Via UI Binder XML
- You can include theme/styling in your gwt.xml file like
I’m confused about what job each one of these four is supposed to accomplish. In other words, how do these “CSS mechanisms” work together to provide a web app with all the styling it needs, or are they just different ways of accomplishing the same thing? Do they each have different pros/cons in different scenarios, and if so, what are they?
I like the strategy of using a
LayoutPanel to position the major display regions of my app, and then using CSS to style the individual regions, containers, etc. So it seems like the first case above (HTML external CSS link) would not be something I’d be looking for, seeing that I would want to customize the CSS for each new widget as my UI evolves.
I guess I’m just looking for a litmus to go by when trying to choose between my CSS options in GWT-land. Thanks in advance!