If I use a widget of yours I would be totally fine with it if your widget
has two or more css classes applied to define its look and feel/position.
If I want to overwrite your css I would add an additional css class of my
own CssResource to your widget or I would reference your widget through my
parent container, e.g. .myContainer .yourWidget { ... }, if possible.
In the first case I just have to make sure that my css class will be
defined after your widget's css class so that my css rules have a higher
priority than yours (or use !important). In the second case .myContainer
.yourWidget automatically has a higher priority because its more specific.
In both cases I don't care if your widget has one or more classes applied
out of the box.
So you would create a SharedClientBundle/CssResource that you can inject
once and that your widgets depend on. I think you could even keep it
private so only your widgets can access/use it.
I don't really see why a widget should only have a single css class. But
its late.. maybe I am missing something :-)
Basic example: http://jsfiddle.net/2vJ2C/
-- J.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/Rfg_Gp11zZAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.