If you want to see your css changes dynamically in GWT Dev Mode you have to inject your e.g. custom-style.css through ClientBundle somewhere in the beginning e.g. onModuleLoad().
===== Create this class inside resource package in you java src ====
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.CssResource.NotStrict;
/**
* Created by panoand on 08/05/2015.
*/
public interface AppResources extends ClientBundle {
AppResources INSTANCE = GWT.create(AppResources.class);
@Source("css/custom-style.css")
@NotStrict
CssResource foo();
}
===== In your EntryPoint class put it inside onLoadModule() methode =====
AppResources.INSTANCE.foo().ensureInjected();
No comments:
Post a Comment