Search code examples
cssgwtcss-reset

gwt - How to CSS reset a GWT app?


What I would like to do is apply a system-wide CSS reset. How can I do this?

Here's a little bit of information about what is meant by a CSS reset.

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on.

http://meyerweb.com/eric/tools/css/reset/


Solution

  • We do this by linking a reset.css in our host html page, as you normally would. It works like you would expect. You can also link reset.css into your module file, but it seems more appropriate in the host page.

    What you might not expect is that GWT's default css will be injected afterwards, even if you don't link it in, if you're inheriting the default theme in the module.xml file. You can affect that behavior. Read http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html for more information about the details of CSS and GWT.