flarum / issue-archive

0 stars 0 forks source link

Deleted user avatar doesn't match format of other avatars #80

Open davwheat opened 3 years ago

davwheat commented 3 years ago

Bug Report

Current Behavior

When using a helper function, such as avatar(), the output should attempt to stay as similar as possible with outputs documented.

Currently, we have 3 different possibilities for avatars:

Text avatar

<span class="Avatar " style="background: rgb(160, 218, 229);">O</span>

Image avatar

<img class="Avatar " src="https://discuss.flarum.org/assets/avatars/fNVaAawAMvap1S2g.png" alt="" title="" style="">

Deleted user avatar

<span class="Avatar "></span>

We should attempt to make the deleted user avatar closer to the Text avatar to prevent styling inconsistencies, such as those currently present in the Notifications area, similar to flarum/framework#2905.

Suggested changes

We could use a FontAwesome icon in place of the text. This can be done with pure CSS, too. Woohoo!

user-times image

user-alt-slash image

user-slash image

trash-alt image

Example

span.Avatar:empty::before {
    content: "\f235"; // For user-times
    color: @control-color;
    font-weight: 700;
    font-family: 'font awesome 5 free';
}
SychO9 commented 3 years ago

I like it empty tbh

davwheat commented 3 years ago

Hmm, we should still insert something in there just to give the element a CSS baseline like the normal text-based avatar. I'd assume just a space might work, actually, but I haven't checked.