From a09187007df783505c27ba590c13d1d5a85b1f28 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Wed, 21 Jul 2021 14:27:10 +0200 Subject: [PATCH] Do not use width/height auto important to avoid enlarging smaller images --- ts/editor/editable-container.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ts/editor/editable-container.ts b/ts/editor/editable-container.ts index 444f04d3f..61d7a4e63 100644 --- a/ts/editor/editable-container.ts +++ b/ts/editor/editable-container.ts @@ -35,10 +35,8 @@ export class EditableContainer extends HTMLDivElement { const imageIndex = sheet.insertRule("anki-editable img {}"); this.imageRule = sheet.cssRules[imageIndex] as CSSStyleRule; - this.imageRule.style.setProperty("width", "auto", "important"); - this.imageRule.style.setProperty("height", "auto", "important"); this.imageRule.style.setProperty("max-width", "min(250px, 100%)", "important"); - this.imageRule.style.setProperty("max-height", "min(250px, 100%)", "important"); + this.imageRule.style.setProperty("max-height", "200px", "important"); } initialize(color: string): void {