While I have your attention:

I tried to make CssImportScopeSample simpler, with no client bundle
built in the java code. Instead the template looked like:

   <ui:style field='outerStyle'

type='com.google.gwt.uibinder.sample.client.CssImportScopeSample.OuterStyle'

       src='CssImportScopeSample.css'/>
   <ui:style field='innerStyle'

type='com.google.gwt.uibinder.sample.client.CssImportScopeSample.InnerStyle'

       src='CssImportScopeSample.css'/>

   <ui:style
import='com.google.gwt.uibinder.sample.client.CssImportScopeSample.OuterStyle

com.google.gwt.uibinder.sample.client.CssImportScopeSample.InnerStyle'>
     .outer-body .inner-body { width: 100px; background-color: red; }
   </ui:style>

   <div class='{outerStyle.body}'>
     <span ui:field='outer'/>
     <div ui:field='inner' class='{innerStyle.body}'>Inner!</div>
   </div>


which lead to this generated Bundle:

   public interface CssImportScopeSample_BinderImpl_GenBundle extends
ClientBundle {
     @Source("CssImportScopeSample.css")
     CssImportScopeSample_BinderImpl_GenCss_outerStyle outerStyle();

     @Source("CssImportScopeSample.css")
     CssImportScopeSample_BinderImpl_GenCss_innerStyle innerStyle();


@Source("uibinder:com.google.gwt.uibinder.sample.client.CssImportScopeSample_BinderImpl_GenCss_style.css")

@Import({com.google.gwt.uibinder.sample.client.CssImportScopeSample.OuterStyle.class,

com.google.gwt.uibinder.sample.client.CssImportScopeSample.InnerStyle.class})
     CssImportScopeSample_BinderImpl_GenCss_style style();
   }

The sad thing is that .outer-body  and .inner-body wound up with
different obfuscated names than the .body classes for the outer and
inner styles, so the nested class selector doesn't get matched. Is that
to be expected, or should I put a bug on CssResource?



http://gwt-code-reviews.appspot.com/78811

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to