Hm a bit more details would be nice. What is complicated on using
ClientBundle? What code does it replicate?
Whats wrong with:
ExampleWidget.gwt.xml:
<ui:with field="common" type="my.app.client.resources.CommonClientBundle"/>
<ui:style>
/* specific rules for ExampleWidget, could also be externalized into a
separate css file */
.myWidget {
padding:5px;
}
.content {
background-color:grey;
margin-left:5px;
}
</ui:style>
<g:HTMLPanel addStyleNames="{style.myWidget}">
<g:Image resource="{common.addIcon}"></g:Image>
<div class="{style.content}">
I am some <a href="#">content</a>
</div>
</g:HTMLPanel>
If you tell your junior developers "Put widget specific css into an inline
style (or widget specific css file) and take common things from the common
ClientBundle" whats hard to explain then? Also overriding CSS style on
general HTML elements inside an UiBinder widget should pretty much always
happen in the context of that widget so you dont mess up anything else:
<ui:style>
/* bad as it can globally override existing "a" CSS rules */
a:link {
color:red;
}
/* better */
.myWidget a:link {
color:red;
}
</ui:style>
-- J.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.