From dc4a915de1ea7df0aec148e0b2087989d5ebbb99 Mon Sep 17 00:00:00 2001 From: Matthias Metelka <62722460+kleinerpirat@users.noreply.github.com> Date: Fri, 5 May 2023 11:16:06 +0200 Subject: [PATCH] Prevent skewing of resized images in editor (#2488) * Unset inline size when shrinking images to prevent skewing (https://forums.ankiweb.net/t/is-there-a-way-to-prevent-the-squish-skew-of-the-image-in-the-browser-editor/29925) * Unset inline width/height for all images when shrinking is enabled --- ts/editable/editable-base.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ts/editable/editable-base.scss b/ts/editable/editable-base.scss index 54e9ef72c..289b6d432 100644 --- a/ts/editable/editable-base.scss +++ b/ts/editable/editable-base.scss @@ -33,6 +33,9 @@ img:not(.mathjax) { :host-context(.shrink-image) & { max-width: var(--editor-default-max-width); max-height: var(--editor-default-max-height); + // prevent inline width/height from skewing aspect ratio + width: unset; + height: unset; } }