tags:

views:

352

answers:

2

I'm interested in GWT but find the default styles so ugly. I know CSS, but have no big idea about how to modify the GWT styles technically. A tutorial on this would be great.

A: 

Here is a link to one introduction. Basically, you can call "setStyleName" on your GWT widget and give it whatever CSS style you want. Then you can do the fiddling with exact colors or whatever in the CSS file like you would normally.

Peter Recore
I rather tend to use setStylePrimaryName instead, this way all derived styles are also automatically updated.GWT contains now 3 example stylesheets you can use. Maybe you could take a look at those to get an idea how they work ?
David Nouls
A: 

Recent versions of GWT include three themes, Standard, Chrome, and Dark. If that's what you mean by "the default styles" then you can remove it by making sure that your module definition doesn't include any of these:

<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name='com.google.gwt.user.theme.chrome.Chrome'/>
<inherits name='com.google.gwt.user.theme.dark.Dark'/>
Isaac Truett