When working with GWT using CssResource and ClientBundle, you can create conditional statements like:
@if <deferred-binding-property> <space-separated list of values> {
... css rules ...
}
In a recent project of mine, I wanted to adjust the font size for mobile devices. I attempted to do this with the following code:
@def fontSize 1.1875em;
@if formfactor mobile {
@def fontSize 2.375em;
}
.my_font{
font-family: Arial;
font-weight: normal;
font-size: fontSize;
cursor: default;
}
However, I encountered an issue where it always used the font size specified within the @if statement, regardless of the "formfactor" (a gwt property based on the device) value. Can anyone provide insight into this problem or suggest an alternative approach to achieving my goal?