Fix emoji replacements, make emoji images consistent#12567
Conversation
|
Tests seem to fail |
|
Fixed |
|
Hmm there seems to be some double escaping going on which makes pull_create_test.go fail, will check out later. |
- Fix emoji not being replaced in issue title change text - Make the image attributes consistent, add alt, remove align
|
This could lead to some confusion when changing title between emoji literals and shorthands. Not a big thing though. Anyway, found this amazing snippet to fix :gitea: not getting struck through, as well as the misalignment due to strike {
text-decoration: none;
position: relative;
display: inline-block;
}
strike:after {
content: "";
position: absolute;
bottom: 0;
left: 0;
height: calc(50% - 0.5px);
width: 100%;
border-top: 1px solid;
}Edit: changing from Changing |
|
Not sure if it's a good idea to alter browser styles like that (some browser might want render strikethrough lines differently), but I'd do a slight variation (perfect centering and line does not interfere with clicks): strike {
text-decoration: none;
position: relative;
}
strike::after {
content: "";
position: absolute;
left: 0;
right: 0;
top: calc(50% - 0.5px);
height: 1px;
background: currentcolor;
pointer-events: none;
}Probably stuff for another PR. |
See my updated comment. There are some tests to be done there. |
|
You can probably never perfectly immidate browser strikethrough styles because the spec does not dictate them to be pixel-perfect so this will always be kind of a hack. |
|
FWIW, one can also not strikethrough GitHub's images: |
|
Confirmed to be Chromium-specific. Firefox looks perfect (my suggested imitation resembles the graphical rendering of Chromium though, not Firefox). In your variation it should be Edit: by Chromium-specific I mean the fact Firefox strikes through the entire |
|
🚀 |


Before:

After:
