CssResources does not know about the "primary style names" and "dependent 
style names" concepts of widgets, so ".toggle-down" with be obfuscated to 
something that does not end in "-down", which the ToggleButton is using.
You have to either:

   - find a unique name for the CSS class, and disable obfuscation 
   (styleName="foo" in the widget, and @external foo-down, foo-down-hovering; 
   in the ui:style)
   - or combine the default .gwt-ToggleButton-down with your own css class: 
   addStyleNames="{style.toggle}" in the widget, and @external gwt-*; 
   .toggle.gwt-ToggleButton-down in the ui:style (note: no space between 
   .toggle and .gwt-ToggleButton-down); this won't work in some versions of IE 
   though.


On Tuesday, February 26, 2013 1:13:04 PM UTC+1, membersound wrote:
>
> I want to override button gwt styles directly in uibinder. But why does 
> the following not work?
>
> <g:ToggleButton styleName="{style.toggle}" />
>
> <ui:style>
> .toggle-down, .toggle-down-hovering {
>   background: red !important;
>   background-color: red!important;
> }
> </ui:style>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to