mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Do not use width/height auto important to avoid enlarging smaller images
This commit is contained in:
parent
a1df49b11e
commit
a09187007d
1 changed files with 1 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue