gwt and css

18 views
Skip to first unread message

gwt-newbie

unread,
Apr 15, 2012, 2:19:50 AM4/15/12
to google-we...@googlegroups.com
Hi all,

Typically, I use ids and id scoped styles for child elements of that id to control how they look when contained by that id.  However, this doesn't seem to work well in gwt. There appears to be no support to set fixed ids for widgets in the ui binder other than debugId. Also does the ui:style element even support # styles since it mangles names of classes?

How do gwt veterans style their views? It appears that with gwt one is forced to use classes to style most things and then setting classes on child widgets to change the look based on the container it appears in. 

Thanks for any guidance on this matter.


Qian Qiao

unread,
Apr 20, 2012, 10:19:18 AM4/20/12
to google-we...@googlegroups.com

What's the reason you don't want to use classes?

.theme1 .myWidget {
background-color: red;
}

.theme2 .myWidget {
background-color: black;
}

The above code snippet seemed a lot easer than using IDs

-- Joe

Reply all
Reply to author
Forward
0 new messages