How exactly could you override CssResource

I currently have an application using CssResource in gwt, like this ...

interface MyClientBundle extends ClientBundle{

@Source("images/one.png")
Image someImageThatAlwaysLooksTheSame();

@Source("images/two.png")
Image someImageThatDependingOnTheClientThemeChanges();

@Source("css/main.css")
MyCssResource css();

}

And then the CssResource interface

interface MyCssResource extends CssResource{

String someStyleThatNeverChanges();

String someStyleThatChangesDependingOnTheClient();

}

If I override MyClientBundle to create and interface called MyPinkThemedClientBundle

interface MyClientBundle extends ClientBundle{

@Source("images/one.png")
Image someImageThatAlwaysLooksTheSame();

@Source("images/**twoPinkVersion**.png")
Image someImageThatDependingOnTheClientThemeChanges();

@Source("css/**mainPinkVersion**.css")
MyPinkCssResource css();

}

Then of course MyPinkCssResource extends MyCssResource

interface MyPinkCssResource extends MyCssResource{


} 

The problem is that when I try to compile this, the GWT compiler complains that the "css / mainPinkVersion.css" missing style name is "someStyleThatNeverChanges". I would think that the cssresource interface inherits the backup css file of its superclass. If this is not the case, is it possible to achieve the effect of the CssResource extension and override only the classes that interest you, but otherwise use the .sss support file of the superclasses?

+3
1

. , @Import GWT, . MyPinkThemedClientBundle css() :

@Source({"main.css", "css/**mainPinkVersion**.css"})
MyCssResource css();

CSS , , MyPinkCssResource.

+6

All Articles