Best way to style GWT widgets in a library
Posted
by helios
on Stack Overflow
See other posts from Stack Overflow
or by helios
Published on 2010-04-28T10:50:28Z
Indexed on
2010/04/28
10:53 UTC
Read the original article
Hit count: 266
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?
© Stack Overflow or respective owner