-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor our font stack #99429
Refactor our font stack #99429
Conversation
@@ -157,7 +157,7 @@ blockquote { | |||
} | |||
|
|||
code { | |||
font-family: var(--vscode-editor-font-family, Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback"); | |||
font-family: var(--vscode-editor-font-family, "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjbvz please review this change, I tried to adjust this to be our standard monospace font we use in the workbench by combining the rules from our monaco-monospace-font
into one
html:lang(zh-Hans) { | ||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; | ||
} | ||
/* Font Families (with CJK support) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RMacfarlane please review this change, it copies the CSS rule we define for the workbench to have the exact same font stack.
html:lang(zh-Hans) { | ||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; | ||
} | ||
/* Font Families (with CJK support) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RMacfarlane please review this change, it copies the CSS rule we define for the workbench to have the exact same font stack.
@@ -18,7 +18,7 @@ | |||
} | |||
|
|||
body { | |||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif; | |||
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joaomoreno @chrmarti note that auth.html
does not seem to have a notion of platform, I think it should follow the same structure as process explorer and issue reporter.
.monaco-editor { | ||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; | ||
--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexdima fyi this defines the monaco-monospace-font
for standalone editor to be a union of the 3 platform specific rules we have in the workbench
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thank you!
@@ -128,7 +128,7 @@ | |||
|
|||
.monaco-workbench .notebookOverlay .output > div.foreground .output-stream, | |||
.monaco-workbench .notebookOverlay .output > div.foreground .output-plaintext { | |||
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback"; | |||
font-family: var(--monaco-monospace-font); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rebornix fyi this adopts the CSS variable for notebooks
@@ -683,7 +684,7 @@ export class ToggleViewModeAction extends Action { | |||
} | |||
|
|||
export class RepositoryPane extends ViewPane { | |||
private readonly defaultInputFontFamily = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif'; | |||
private readonly defaultInputFontFamily = DEFAULT_FONT_FAMILY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joaomoreno fyi this uses the platform specific font rules
@@ -257,8 +257,9 @@ export class ReleaseNotesManager { | |||
} | |||
|
|||
code { | |||
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback"; | |||
font-size: 14px; | |||
font-family: var(--vscode-editor-font-family); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjbvz @joaomoreno fyi this aligns release notes editor with other webviews
@@ -64,7 +65,7 @@ export class WebviewThemeDataProvider extends Disposable { | |||
}, {} as { [key: string]: string; }); | |||
|
|||
const styles = { | |||
'vscode-font-family': 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif', | |||
'vscode-font-family': DEFAULT_FONT_FAMILY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjbvz fyi this uses the platform specific rule that is shared
Webview changes look good to me. Thanks @bpasero! |
This PR fixes #99428
Following changes are included:
monaco-monospace-font
everywhere and define it for standalone editor too (via 2872e27)system-ui
beforeUbuntu
but afterSegoe
(via ff69562 and 61214b5) to only change it for Linux distros unless they ship a Segoe font