1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Make typedInput themeable

This commit is contained in:
Mauricio Bonani 2022-04-03 18:11:24 -04:00
parent e97f4c4054
commit c9fa5c7284
2 changed files with 12 additions and 1 deletions

View File

@ -637,7 +637,7 @@
if (opt.icon.indexOf("<") === 0) {
$(opt.icon).prependTo(op);
} else if (opt.icon.indexOf("/") !== -1) {
$('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px; height: 18px;"}).prependTo(op);
$('<i>',{class:"red-ui-typedInput-icon", style:"mask-image: url("+opt.icon+"); -webkit-mask-image: url("+opt.icon+");"}).prependTo(op);
} else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op);
}

View File

@ -104,6 +104,17 @@
}
.red-ui-typedInput-icon {
margin-right: 6px;
&:not(.fa) {
-webkit-mask-size: cover;
mask-size: cover;
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $primary-text-color;
height: 14px;
width: 12px;
}
}
}
button.red-ui-typedInput-type-select,