From 99bd4e1705d502bd5444ade53b0650c7891d1b4a Mon Sep 17 00:00:00 2001 From: Raffaele De Feo Date: Fri, 6 Mar 2020 12:54:45 +0100 Subject: [PATCH] Fix property names in `CSSStyleDeclaration.setProperty`. --- packages/markdownviewer/src/widget.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/markdownviewer/src/widget.ts b/packages/markdownviewer/src/widget.ts index 9589a5add23d..dd290ea05a45 100644 --- a/packages/markdownviewer/src/widget.ts +++ b/packages/markdownviewer/src/widget.ts @@ -95,21 +95,21 @@ export class MarkdownViewer extends Widget { const { style } = this.renderer.node; switch (option) { case 'fontFamily': - style.setProperty(option, value as string | null); + style.setProperty('font-family', value as string | null); break; case 'fontSize': - style.setProperty(option, value ? value + 'px' : null); + style.setProperty('font-size', value ? value + 'px' : null); break; case 'hideFrontMatter': this.update(); break; case 'lineHeight': - style.setProperty(option, value ? value.toString() : null); + style.setProperty('line-height', value ? value.toString() : null); break; case 'lineWidth': const padding = value ? `calc(50% - ${(value as number) / 2}ch)` : null; - style.setProperty('paddingLeft', padding); - style.setProperty('paddingRight', padding); + style.setProperty('padding-left', padding); + style.setProperty('padding-right', padding); break; case 'renderTimeout': if (this._monitor) {