I use GWT ClientBundle with CssResource. I have a css file test.css with the following classes:

.c1 {
}

.c2 {
}

When I want to use classes from test.css I have to do the following in my application:

public interface Resources extends ClientBundle {

    @Source({Css.DEFAULT_CSS })
    Css css();
}

public interface Css extends CssResource {

    String DEFAULT_CSS = "buddyis/mobile/client/views/ItemView.css";


    String c1();
    String c2();
}

The problem is that I have to define all the classes from test.css even if I don't use them. Is there a way that I have do define only the classes that I use?

有帮助吗?

解决方案

Add the @NotStrict annotation to the CssResource.

This should solve your problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top