noodlebox / betterdiscord-plugins

Assorted small plugins for BetterDiscord
MIT License
87 stars 125 forks source link

KawaiiEmotes: Avoid resampling Twitch-size (28x28) emotes #3

Closed noodlebox closed 2 years ago

noodlebox commented 7 years ago

Related: https://github.com/noodlebox/KawaiiDiscord/issues/11

For default-sized emoji, this CSS fixes the issue:

.emoji.jumboable {
    object-fit: scale-down;
}

For larger emoji, use transform: scale() instead of width and height:

.emoji.jumboable {
    object-fit: scale-down;
    image-rendering: pixelated;
    transform: scale(2);
    margin: 16px calc(.05em + 16px) 16px calc(.1em + 16px) !important;
}
.compact .emoji.jumboable {
    transform: none;
    margin: 0 .05em 0 .1em !important;
}