1
0
mirror of https://github.com/flarum/core.git synced 2025-08-15 12:54:47 +02:00

Fix regressions from #73 and #68, align things better in modal

This commit is contained in:
David Sevilla Martin
2020-02-25 18:57:38 -05:00
parent ed7622ee2d
commit 3d71f6451a
3 changed files with 22 additions and 11 deletions

View File

@@ -1,8 +1,14 @@
import classList from 'flarum/utils/classList';
export default function tagIcon(tag, attrs = {}, settings = {}) {
const hasIcon = tag && tag.icon();
const { useColor = true } = settings;
attrs.className = 'icon TagIcon '+ (attrs.className || '') + ' ' + (hasIcon ? tag.icon() : 'default');
attrs.className = classList([
attrs.className,
'icon',
hasIcon ? tag.icon() : 'TagIcon'
]);
if (tag) {
attrs.style = attrs.style || {};

View File

@@ -1,19 +1,14 @@
.TagIcon {
border-radius: @border-radius;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: -3px;
margin-left: 1px;
text-align: center;
font-size: 1rem;
background: @control-bg;
&.untagged {
border: 1px dotted @muted-color;
background: transparent;
}
&.default {
border-radius: @border-radius;
background: @control-bg;
vertical-align: -3px;
}
}

View File

@@ -107,15 +107,24 @@
&.active {
background: @control-bg;
}
.icon::before {
display: inline-block;
width: 16px;
text-align: center;
vertical-align: middle;
}
&.selected {
.icon::before {
.fa();
content: @fa-var-check !important;
color: @muted-color !important;
color: @muted-color;
font-size: 14px;
width: 100%;
text-align: center;
vertical-align: 1px;
}
&.colored .TagIcon:before {
color: #fff;
}
@@ -123,6 +132,7 @@
.TagIcon {
vertical-align: top;
margin-top: 3px;
margin-left: 0;
}
}
}