Skip to content

how do I change the icon color of the toolbar button? #2176

Answered by mpf82
jianyunli asked this question in Q&A
Discussion options

You must be logged in to vote

item.style is only applied to the caption: https://w2ui.com/web/docs/2.0/w2toolbar.item_template

Since the icons already have a color set by the w2ui css, you must either define a very specific selector or use !important

Example:

.w2ui-tb-icon > span {
  color: green !important;
}
.w2ui-tb-icon > span.w2ui-icon-plus {
  color: blue !important;
}

Fiddle:

http://jsfiddle.net/2pnudbwy/

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jianyunli
Comment options

Answer selected by jianyunli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants