mirror of
https://github.com/flarum/core.git
synced 2025-08-07 00:47:00 +02:00
chore: avoid using .fa()
mixins and @fa-var
vars (#3912)
This commit is contained in:
@@ -30,10 +30,7 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @TODO: 2.0 use an icon in the XSLT template.
|
.icon {
|
||||||
&:before {
|
|
||||||
.fas();
|
|
||||||
content: @fa-var-reply;
|
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -122,10 +122,10 @@ class ConfigureMentions
|
|||||||
$tag->template = '
|
$tag->template = '
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@deleted != 1">
|
<xsl:when test="@deleted != 1">
|
||||||
<a href="{$DISCUSSION_URL}{@discussionid}/{@number}" class="PostMention" data-id="{@id}"><xsl:value-of select="@displayname"/></a>
|
<a href="{$DISCUSSION_URL}{@discussionid}/{@number}" class="PostMention" data-id="{@id}"><i class="icon fas fa-reply"></i><xsl:value-of select="@displayname"/></a>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<span class="PostMention PostMention--deleted" data-id="{@id}"><xsl:value-of select="@displayname"/></span>
|
<span class="PostMention PostMention--deleted" data-id="{@id}"><i class="icon fas fa-reply"></i><xsl:value-of select="@displayname"/></span>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>';
|
</xsl:choose>';
|
||||||
|
|
||||||
|
@@ -194,7 +194,7 @@ export default class TagSelectionModal<
|
|||||||
{tags.map((tag) => (
|
{tags.map((tag) => (
|
||||||
<li
|
<li
|
||||||
data-index={tag.id()}
|
data-index={tag.id()}
|
||||||
className={classList({
|
className={classList('SelectTagListItem', {
|
||||||
pinned: tag.position() !== null,
|
pinned: tag.position() !== null,
|
||||||
child: !!tag.parent(),
|
child: !!tag.parent(),
|
||||||
colored: !!tag.color(),
|
colored: !!tag.color(),
|
||||||
@@ -205,7 +205,10 @@ export default class TagSelectionModal<
|
|||||||
onmouseover={() => (this.indexTag = tag)}
|
onmouseover={() => (this.indexTag = tag)}
|
||||||
onclick={this.toggleTag.bind(this, tag)}
|
onclick={this.toggleTag.bind(this, tag)}
|
||||||
>
|
>
|
||||||
{tagIcon(tag)}
|
<i className="SelectTagListItem-icon">
|
||||||
|
{tagIcon(tag, { className: 'SelectTagListItem-tagIcon' })}
|
||||||
|
<i className="icon TagIcon fas fa-check SelectTagListItem-checkIcon"></i>
|
||||||
|
</i>
|
||||||
<span className="SelectTagListItem-name">{highlight(tag.name(), filter)}</span>
|
<span className="SelectTagListItem-name">{highlight(tag.name(), filter)}</span>
|
||||||
{tag.description() ? <span className="SelectTagListItem-description">{tag.description()}</span> : ''}
|
{tag.description() ? <span className="SelectTagListItem-description">{tag.description()}</span> : ''}
|
||||||
</li>
|
</li>
|
||||||
|
@@ -77,6 +77,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.SelectTagListItem-checkIcon {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
display: none;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.SelectTagList {
|
.SelectTagList {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -124,26 +131,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
.icon::before {
|
.SelectTagListItem-checkIcon {
|
||||||
.fas();
|
display: inline-block;
|
||||||
content: @fa-var-check !important;
|
|
||||||
color: var(--muted-color);
|
color: var(--muted-color);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
text-align: center;
|
|
||||||
vertical-align: 1px;
|
|
||||||
}
|
}
|
||||||
|
.SelectTagListItem-tagIcon::before {
|
||||||
&.colored .TagIcon:before {
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
&.colored .TagIcon + .SelectTagListItem-checkIcon {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.TagIcon {
|
|
||||||
vertical-align: top;
|
|
||||||
margin-top: 3px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.SelectTagListItem-icon {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
.SelectTagListItem-name {
|
.SelectTagListItem-name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
|
@@ -338,7 +338,10 @@ export default class Composer extends Component {
|
|||||||
items.add(
|
items.add(
|
||||||
'minimize',
|
'minimize',
|
||||||
<ComposerButton
|
<ComposerButton
|
||||||
icon="fas fa-minus minimize"
|
icon={classList('fas minimize', {
|
||||||
|
'fa-minus': app.screen() !== 'phone',
|
||||||
|
'fa-times': app.screen() === 'phone',
|
||||||
|
})}
|
||||||
title={app.translator.trans('core.forum.composer.minimize_tooltip')}
|
title={app.translator.trans('core.forum.composer.minimize_tooltip')}
|
||||||
onclick={this.state.minimize.bind(this.state)}
|
onclick={this.state.minimize.bind(this.state)}
|
||||||
itemClassName="App-backControl"
|
itemClassName="App-backControl"
|
||||||
|
@@ -145,6 +145,7 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className="Search-input">
|
<div className="Search-input">
|
||||||
|
<Icon name="fas fa-search Search-input-icon" />
|
||||||
<input
|
<input
|
||||||
aria-label={searchLabel}
|
aria-label={searchLabel}
|
||||||
className="FormControl"
|
className="FormControl"
|
||||||
|
@@ -58,9 +58,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--muted-color);
|
color: var(--muted-color);
|
||||||
|
|
||||||
&:before {
|
&-icon {
|
||||||
.fas();
|
|
||||||
content: @fa-var-search;
|
|
||||||
margin-right: -36px;
|
margin-right: -36px;
|
||||||
width: 36px;
|
width: 36px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@@ -16,5 +16,6 @@
|
|||||||
margin-left: -30px;
|
margin-left: -30px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
color: var(--control-color);
|
color: var(--control-color);
|
||||||
.fa-fw();
|
text-align: center;
|
||||||
|
width: 1.25em;
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,8 @@
|
|||||||
.icon {
|
.icon {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
.fa-fw();
|
text-align: center;
|
||||||
|
width: 1.25em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -155,9 +155,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.Composer-controls .fa-minus:before {
|
|
||||||
content: @fa-var-times;
|
|
||||||
}
|
|
||||||
.composer-backdrop {
|
.composer-backdrop {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
Reference in New Issue
Block a user