Skip to content

Commit

Permalink
Increase default markup font size
Browse files Browse the repository at this point in the history
For #126294
  • Loading branch information
mjbvz committed Nov 9, 2021
1 parent 87ea829 commit a4ad395
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions extensions/markdown-language-features/notebook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ export const activate: ActivationFunction<void> = (ctx) => {

const style = document.createElement('style');
style.textContent = `
#preview {
font-size: 1.1em;
}
.emptyMarkdownCell::before {
content: "${document.documentElement.style.getPropertyValue('--notebook-cell-markup-empty-content')}";
font-style: italic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ configurationRegistry.registerConfiguration({
tags: ['notebookLayout']
},
[NotebookSetting.markupFontSize]: {
markdownDescription: nls.localize('notebook.markup.fontSize', "Controls the font size of rendered markup in notebooks. When set to `0`, the value of `#editor.fontSize#` is used."),
markdownDescription: nls.localize('notebook.markup.fontSize', "Controls the font size of rendered markup in notebooks. When set to `0`, 120% `#editor.fontSize#` is used."),
type: 'number',
default: 0,
tags: ['notebookLayout']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
'notebook-markdown-left-margin': `${this.options.markdownLeftMargin}px`,
'notebook-output-node-left-padding': `${this.options.outputNodeLeftPadding}px`,
'notebook-markdown-min-height': `${this.options.previewNodePadding * 2}px`,
'notebook-markup-font-size': `${this.options.markupFontSize}px`,
'notebook-markup-font-size': typeof this.options.markupFontSize === 'number' && this.options.markupFontSize > 0 ? `${this.options.markupFontSize}px` : `calc(${this.options.fontSize}px * 1.2)`,
'notebook-cell-output-font-size': `${this.options.fontSize}px`,
'notebook-cell-markup-empty-content': nls.localize('notebook.emptyMarkdownPlaceholder', "Empty markdown cell, double click or press enter to edit."),
'notebook-cell-renderer-not-found-error': nls.localize({
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/notebook/common/notebookOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class NotebookOptions extends Disposable {
insertToolbarAlignment,
showFoldingControls,
fontSize,
markupFontSize: markupFontSize > 0 ? markupFontSize : fontSize,
markupFontSize,
editorOptionsCustomizations,
};

Expand Down Expand Up @@ -267,7 +267,7 @@ export class NotebookOptions extends Disposable {
}

if (markupFontSize) {
configuration.markupFontSize = this.configurationService.getValue<number>(NotebookSetting.markupFontSize) || configuration.fontSize;
configuration.markupFontSize = this.configurationService.getValue<number>(NotebookSetting.markupFontSize);
}

if (editorOptionsCustomizations) {
Expand Down

0 comments on commit a4ad395

Please sign in to comment.