Thanks all for your feedback. The reason I was trying to do this in
CSS is that I have one CSS files with media selectors that handle
subtle (but important) layout changes for different orientations that
also work on mobile phones, small (~7in) tables, and large tablets. To
do this in UIBinder
If you can detect the changes in JS, can't you simply switch a few CSS
classes here and there?
You could even switch a global one on the body element and use the
descendant selector everywhere: .portrait .foo, .landscape .foo, putting
class=portrait or class=landscape on the body element.
--
Thanks for the tip Sanjay,
Looking into getText for the CssResource though it looks like only one
branch of the @if statement is contained in the CssResource.getText()
value. E.g., below you can see that only the @else block has been
included in the CssResource text (the correct block is always
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
Yes, I agree. Even if my proposed method worked, it is not meant for this.
If anything, CSS3 Media Queries are meant for this. Alas, gwt doesnt support
them yet.
My advice: as much as possible, build fluid layouts that scale to the amount
of room on the screen. If you need a master/details
AFAIK, ensureInjected() on CssResource just calls getText() and injects a
style element into the DOM using StyleInjector once and only once.
getText() is more interesting. Every CssResource text is converted into a
series of string concatenations. The runtime evaluation
@if (boolean-expr) {
Submitted as Issue 6754.
http://code.google.com/p/google-web-toolkit/issues/detail?id=6754
On Aug 31, 3:21 pm, Rylan ry...@icottrell.com wrote:
+1
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to
+1
On Aug 28, 11:39 pm, 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.,
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
Interesting... +1
2011/8/29 rth rthol...@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.,
10 matches
Mail list logo