我想创建像最大化或最小化这样的工具类型:
{
type: 'my-type-name',
tooltip: 'Make Toolbar Float',
listeners: {
click: function(panel , e , owner , eOpts){}
}为了实现这个目标,我已经在Tool.scss中创建了类,就像在主题库中一样
.#{$prefix}tool-tool-type-my-type-name{
@include icon($tool-my-type-name-icon);
}但图标是私人混入的,在Tool.scss中不可见。在那之后,我创建了那个类自己的声明:
.#{$prefix}tool-tool-type-my-type-name{
content: $fa-var-external-link;
font-family: $font-icon-font-family;
font-size: $tool-glyph-font-size;
color: red;
width:$tool-glyph-font-size;
height:$tool-glyph-font-size;
}那也没什么用。
发布于 2017-06-22 19:50:22
在var/...Tool.scss中
// custom icons:
$tool-my-type-name-glyph: dynamic($fa-var-external-link $tool-glyph-font-size $font-icon-font-family);在src.../Tools.scss中
.#{$prefix}tool-my-type-name {
@if $enable-font-icons and $tool-my-type-name-glyph != null) {
@include font-icon($tool-my-type-name-glyph);
background: none;
} @else {
background-position: 0 ($tool-size * -2);
}
}https://stackoverflow.com/questions/44694748
复制相似问题