Then you create a new css file and copy everything from gwt's theme to your new css file and make modifications to it. Then you create a ClientBundle like
interface AppClientBundle extends ClientBundle {
@Source("yourModifiedTheme.css")
@NotStrict //Not sure if its needed but I guess it is.
CssResource themeCss();
}
and instantiate it in your onModuleLoad():
public void onModuleLoad() {
AppClientBundle bundle = GWT.create(AppClientBundle.class);
bundle.themeCss().ensureInjected(); //injects the CSS into the HTML page.
}
The result is:
The result is:
- The CSS code is now embedded in your JavaScript file, which saves a download request (you dont have a <link href="theme.css" .... /> tag anymore)
- You can control when the CSS should be injected into your HTML file during app startup.
-- J.
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Z9VJsmFPcd0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment