Monday, August 29, 2011

Re: Conditional CSS & Updates

Interesting... +1

2011/8/29 rth <rtholmes@gmail.com>
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
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+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