Re: Conditional CSS & Updates

2011-09-09 Thread rth
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 would seem to require 3 devices x 2 orientations =
6 .ui.xml and CSS files for each of my views which feels really heavy-
weight.

I agree that CSS queries would totally fix this problem but I don't
really expect  http://code.google.com/p/google-web-toolkit/issues/detail?id=4911
to see any progress in the near future.

If I end up finding a solution I will be sure to post it here.

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



Re: Conditional CSS & Updates

2011-09-08 Thread rth
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 there on
initial load according to the value of isPortrait()).

/* @if (org.foo.Application.isPortrait()) { */
.GCP5JXACOJ-org-foo-
MainPaneTablet_MainPaneTabletUiBinderImpl_GenCss_style-stats {
  border : 3px solid blue;
}
/* } */
... rest of the styles

Because the alternate style has been compiled away even injecting it
again will not help in this case.

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



Re: Conditional CSS & Updates

2011-09-01 Thread rth
Submitted as Issue 6754.

http://code.google.com/p/google-web-toolkit/issues/detail?id=6754

On Aug 31, 3:21 pm, Rylan  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 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.



Conditional CSS & Updates

2011-08-29 Thread rth
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.