Yes, in the example I gave there's no clear need for the inheritance with 
MyCss, it's just there to show how inheritance would be setup to try to 
illustrate the issue I was referring to.

It seems more and more like it's probably best to avoid inheritance and 
just go in the @Import direction. Even if you have to make sure the 
imported css are themselves injected or that you have to add those classes 
via their actual interfaces instead of as inherited, this seems to be more 
maintainable than the @Shared+inheritance and having to redeclare the 
super's selectors in the extended css.

Thanks again for the help Thomas, it's much appreciated.

On Sunday, February 23, 2014 11:09:59 PM UTC+1, Thomas Broyer wrote:
>
>
>
> On Sunday, February 23, 2014 10:13:00 PM UTC+1, GWTter wrote:
>>
>> Hi Thomas,
>>
>> I think this part right here is the clarification I needed:
>>
>>
>>    - mapping class names to/from methods is based on the method name or 
>>    a @ClassName annotation (the class name in the CSS file will thus be 
>>    replaced with the unique name computed for the method)
>>
>> So, if you want to reuse a class name in a selector, then use @Import or 
>> @Shared+inheritance. The difference is that with @Shared you're forced to 
>> declare rules for the inherited/shared class names (to satisfy the 4th rule 
>> above), and the class name is accessible from outside the CSS file, from 
>> the CssResource interface (because of inheritance).
>>
>> I'd like to think I wasn't misunderstanding anything as I can't find 
>> anywhere in the doc where it says if you use @Shared with inheritance then 
>> you have to declare all the super cssresource selectors in the extending 
>> cssresource's css.
>>
>
> The basic rule is that each method's class name is used at least once in 
> the stylesheet, whether this method is declared on the interface or 
> inherited from a superinterface doesn't matter. @Shared is only about the 
> unique name (obfuscated name) of the class name, it doesn't change the 
> other rules.
>

-- 
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 google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to