Issue #6290 resolved

Emoji in commit messages break layout

Miloš Levačić avatarMiloš Levačić created an issue

Emoji icons break the layout a bit, when used in commit messages.

Here's the repro'd bug (in a public repo created for issue #6273 which seems to be fixed now, so I'm going to use it for this to skip creating a new repo).

Adding the following to the CSS seems to work for me

.emoji {
    /* in addition to the already defined style: */
    position: relative;
    margin-top: -8px;
    top: 6px;

The margin-top first pulls the whole <div> content up 8px (which is probably the difference between the 14px font-size and the 22px height of the span.emoji), and the top pushes the icon back down to where it should be. (The position is obviously there to make top work).

This seems about right for me (visually), but I didn't put much thought into it, so there might be a better solution.

Comments (2)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.