Skip to content

Commit

Permalink
Merge pull request #8004 from AlbertHilb/setPropertyFix
Browse files Browse the repository at this point in the history
Fix property names in `CSSStyleDeclaration.setProperty` (#7917)
  • Loading branch information
jasongrout committed Mar 6, 2020
2 parents 14f01b8 + 99bd4e1 commit 0fd510c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/markdownviewer/src/widget.ts
Expand Up @@ -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) {
Expand Down

0 comments on commit 0fd510c

Please sign in to comment.