[frontend/components] Make inline emojis consistent with reaction emojis but with fixed width
This commit is contained in:
parent
0a866bad75
commit
7e6fba61da
2 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,13 @@
|
|||
@using Iceshrimp.Shared.Schemas.Web
|
||||
|
||||
<img class="custom-reaction" src="@Reaction.Url" alt="@Reaction.Name"/>
|
||||
@if (Reaction.Url == null)
|
||||
{
|
||||
<span class="unicode-reaction">@Reaction.Name</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img class="custom-reaction" src="@Reaction.Url" alt="@Reaction.Name"/>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired] public required NoteReactionSchema Reaction { get; set; }
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
.custom-reaction {
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
object-fit: contain;
|
||||
vertical-align: middle;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.unicode-reaction {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 1.5em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue