I want to change the search iron-icon's background-color to blue. I tried adding a style attribute and setting the background-color: blue but that didn't work. All help is greatly appreciated.
<iron-icon icon="icons:search" on-click="doSomething" hidden$="{{disabled}}"></iron-icon>
You just need to update the fill
in css. The default value is currentColor
which will match your text color.
<iron-icon icon="icons:search" on-click="doSomething" hidden$="{{disabled}}"
style="fill:blue">
</iron-icon>
<iron-icon icon="icons:search" on-click="doSimpleSearch" hidden$="{{disabled}}" class="searchIcon"></iron-icon>
.searchIcon {
fill: #ffffff;
*background-color: #3BC2E6;*
height: 38px;
width: 60px;
border-radius: 5px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With