In GWT Bootstrap, how to assign different styles to different instances of same Bootstrap elements? -
for gwt bootstrap, have navlists definitions as:
<b:navlist> <b:navheader>my header</b:navheader> <b:navlink href="#menu1:">my menu1</b:navlink> <b:navlink href="#menu2:" active="true">my menu2</b:navlink> </b:navlist>
in same application have 2 kind of components this, (1) 1 placed on white panel left menu, (2) other placed on dargreen panel bottom menu. both navlists.
so have problem assign different colours different instances of same bootstrap elements. suppose can straight in uibinder but, after trying not find right settings. bootstrap selector need override in uibinder (from less nav files):
.nav-list > li > { padding: 3px 15px; color: #ff0000; <======= how override color in uibinder }
i figure out common use case, same element, instances different style. how can addressed?
all need add custom style name style.
<ui:style> .mycustomstyle > li > { color: color here; } </ui:style> ... <b:navlist stylename="{style.mycustomstyle}"> <b:navheader>my header</b:navheader> <b:navlink href="#menu1:">my menu1</b:navlink> <b:navlink href="#menu2:" active="true">my menu2</b:navlink> </b:navlist>
the example above has style directly in uibinder file. alternatively use clientbundle
it. way can use same style on many widgets on in different places in app.
Comments
Post a Comment