@Jens: but how do you select the correct "MediaQueryAwareCssResource", and what about switching MediaQueryAwareCssResource when the screen is resized?
Ok then a bit more:
interface MediaQuery {
int getWidth();
String getSource();
}
enum AppMediaQuery implements MediaQuery {
DESKTOP(<screen size>, "desktop.css"),
MOBILE(<screen size>, "mobile.css")
}
interface ClientBundle {
CssResource baseStyle();
@MediaQuery({AppMediaQuery.DESKTOP, AppMediaQuery.MOBILE})
MediaQueryCssResource resolutionDependentStyles();
}
When calling resolutionDependentStyles().ensureInjected() it should inject desktop.css and mobile.css with their corresponding media queries.
-- J.
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+unsubscribe@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.
No comments:
Post a Comment