Monday, August 27, 2012

Override body style with CssResource

Hi, I am relatively new to GWT. I am creating a GWT application that will be embedded into a DIV of an existing webapp . Obviously, I would like to keep the existing webapp's styling, especially on the common elements, e.g. body, td, select, etc.

I've read that CssResource is the way to go. So, I gave it a try.

My .gwt.xml has the following lines:

  <inherits name='com.google.gwt.user.theme.standard.Standard'/>
  <inherits name="com.google.gwt.resources.Resources" />

In my css file, I put the styles of the webapp there. I created the ClientBundle and inject my CSS in my EntryPoint.

All seems fine. However, when I invoke the app. on IE8, I see the GWT Standard styles applied first and in a flash, my overridden styles are applied.

So, I think I am overriding the styles successfully. However, how do I avoid that "flash" when the Standard styles are being applied before my styles?

Thanks in advance.

Charles

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/y5fRMAgcXaUJ.
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