hasan-ozbey / flarum-flamoji

Simple emoji manager for Flarum.
MIT License
8 stars 9 forks source link

Fixed size height can cause stretching #2

Open wonderbeel opened 3 years ago

wonderbeel commented 3 years ago

Hi, I noticed a small problem with the style of this extension: currently the emoji height is fixed to 1.5em https://github.com/the-turk/flarum-flamoji/blob/efce7475e439e0d3b4e6f474508cc917db63588e/less/forum.less#L47 This can cause stretching if the image has a smaller height than that value, for example old school emoticons are usually 16x16px in size, with a base font-size of 14px 1.5em will be resolved to 21px causing a stretch. In my flarum installation I overwrote the styles to use a max-height instead of height to avoid this issue, I would suggest to do the same thing here (use max-height in combination with max-width to create a maximum size box) or to make that height customizable directly from the admin dashboard to allow the admins to change it if necessary :smiley: .

hasan-ozbey commented 3 years ago

Thanks for the report! I think max-height: 1.5em; will fix it without needing max-width definition.

wonderbeel commented 3 years ago

Hey, sorry I missed the notification between other ones. max-width probably will be useful with a sane value just to avoid edge cases like an image that is really short and wide, it will probably work without it I agree.