I don't think you can do this with conditional styles. I think you'd be better off firing an event on the event bus when they orientation changes and just change class/style through an event handler.
On Aug 29, 12:39 am, rth <rthol...@gmail.com> wrote: > Hi, > > I have a Conditional CSS block that calls isPortrait() at runtime and > correctly renders the right rule based on its return value. My problem > is that I cannot figure out how to get the condition to be reevaluated > in the future (e.g., when the orientation changes, I would like to > have the conditional CSS evaluated again and the page rendered with > the new CSS). My sample CSS is below. > > @if (org.foo.Application.isPortrait()) { > .stats { > border: 3px solid red; > }} @else { > > .stats { > border: 3px solid blue; > } > > } > > The docs (http://code.google.com/webtoolkit/doc/latest/ > DevGuideClientBundle.html#Conditional_CSS) states that these > conditions are evaluated at runtime (which I can confirm), so I am > hoping I can somehow force the re-evaluation to happen again. > > Any pointers would be greatly appreciated. > > --rth -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.