I'm havign trouble with a CssResource I'm using.
This is my css:

.Box {
  border: 1px solid #f00;
}
@if user.agent ie6 {
        .Box {
                background: #f00;
        }
}

It's pretty much straight out of the example here:
http://code.google.com/p/google-web-toolkit/wiki/CssResourceCookbook

The problem is that the user.agent detection doesn't seem to work.
That style is never added...

So I thought maybe I was doing it wrong? Tried this...

.Box {
  border: 1px solid #f00;
}
@if user.agent ie6 {
        .Box {
                background: #f00;
        }
} @elif (com.client.Com.Check()) {
        .Box {
                background: #0f0;
        }
} @else {
        .Box {
                background: #00f;
        }
}

where:
        public static boolean Check() {
                if  (Navigator.getUserAgent().toLowerCase().contains("msie"))
                        return(true);
                else
                        return(false);
        }


...and as a result the div has a green background on ie, and blue on
everything else.

Anyone else having issues @if user.agent?  Did something change in
2.0.3 so it doesn't work the same way anymore?

~
D.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to