Increase default markup font size

For #126294
This commit is contained in:
Matt Bierner 2021-11-09 14:22:47 -08:00
parent 87ea829cef
commit a4ad395f23
No known key found for this signature in database
GPG key ID: 099C331567E11888
4 changed files with 4 additions and 8 deletions

View file

@ -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;

View file

@ -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']

View file

@ -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({

View file

@ -156,7 +156,7 @@ export class NotebookOptions extends Disposable {
insertToolbarAlignment,
showFoldingControls,
fontSize,
markupFontSize: markupFontSize > 0 ? markupFontSize : fontSize,
markupFontSize,
editorOptionsCustomizations,
};
@ -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) {