mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 22:43:41 +08:00
fix: icon aligment for tag icons
This commit is contained in:
parent
96b8a97484
commit
5bcc9ff3f1
|
@ -2,7 +2,7 @@ export default function tagIcon(tag, attrs = {}, settings = {}) {
|
|||
const hasIcon = tag && tag.icon();
|
||||
const { useColor = true } = settings;
|
||||
|
||||
attrs.className = hasIcon ? 'icon ' + tag.icon() + ' ' + (attrs.className || '') : 'icon TagIcon ' + (attrs.className || '');
|
||||
attrs.className = 'icon TagIcon '+ (attrs.className || '') + ' ' + (hasIcon ? tag.icon() : 'default');
|
||||
|
||||
if (tag) {
|
||||
attrs.style = attrs.style || {};
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
.TagIcon {
|
||||
border-radius: @border-radius;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: inline-block;
|
||||
vertical-align: -3px;
|
||||
margin-left: 1px;
|
||||
background: @control-bg;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
|
||||
&.untagged {
|
||||
border: 1px dotted @muted-color;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&.default {
|
||||
border-radius: @border-radius;
|
||||
background: @control-bg;
|
||||
vertical-align: -3px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user