I'm developing some widgets into a library for internal use at the company I work for.
I don't know what's the recommended way to style the widgets.
There are at least these ways:
use Widget.setPrimaryStyleName and let the user provide an external css. We use maven archetypes to build applications so we can provide default styles. Anyway I don't like it very much.
use the GWT 2.0 CssResourceBundle. So we can compile the CSS into the module and it will be optimized (and it can be browser-dependant too).
provide a module with the styling. Something like the default GWT themes. But I don't know how exactly this works.
I want to:
- make the components as cohesive as I can (don't depend on externally included css's)
- leave open the door to modify styles (if I want to change the way some widget looks in a concrete application).
What's your experience in this subject?
Note: if you are looking for a definitive answer look through all the answers and the comments. There are different ideas and all good ones. Then choose what is best for you :)