diff --git a/packages/components/src/style/base.less b/packages/components/src/style/base.less index dea7ac88da..16e4c07293 100644 --- a/packages/components/src/style/base.less +++ b/packages/components/src/style/base.less @@ -38,6 +38,12 @@ input::-ms-reveal { // we force a non-overlapping, non-auto-hiding scrollbar to counteract. // 6. Change the default tap highlight to be completely transparent in iOS. +*, +*::before, +*::after { + box-sizing: border-box; // 1 +} + @{html-selector} { font-family: sans-serif; // 2 line-height: 1.15; // 3 diff --git a/packages/core-browser/src/style/normalize.less b/packages/core-browser/src/style/normalize.less index 59ff54eff4..8fa0ee702d 100644 --- a/packages/core-browser/src/style/normalize.less +++ b/packages/core-browser/src/style/normalize.less @@ -2,22 +2,17 @@ html, body { margin: 0; padding: 0; - // 使用该字体获取与vscode一致的图标表现 - // 仅mac下可用,windows待区分 - // https://stackoverflow.com/questions/32660748/how-to-use-apples-new-san-francisco-font-on-a-webpage - font-family: -apple-system, BlinkMacSystemFont, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif; // 全局默认字体颜色 color: var(--foreground); background-color: var(--editor-background); font-size: 13px; - // 设置 antialiased 会导致整体清晰度降低 - // -webkit-font-smoothing: antialiased; } html { /* 防止 overlay/modal 撑开页面元素 */ overflow: hidden; - /* 防止mac上的回退手势 */ + /* 防止 mac 上的回退手势 */ overscroll-behavior-x: none; input::placeholder, diff --git a/packages/webview/src/browser/webview.service.ts b/packages/webview/src/browser/webview.service.ts index 64e2ab4124..25bd290f05 100644 --- a/packages/webview/src/browser/webview.service.ts +++ b/packages/webview/src/browser/webview.service.ts @@ -258,7 +258,7 @@ export class WebviewServiceImpl implements IWebviewService { const styles = { 'vscode-font-family': - '-apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", ans-serif', + '-apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif', 'vscode-font-weight': 'normal', 'vscode-font-size': '13px', 'vscode-editor-font-family': editorFontFamily, diff --git a/tools/electron/src/browser/index.html b/tools/electron/src/browser/index.html index abb9d50a5a..6fb8a14930 100644 --- a/tools/electron/src/browser/index.html +++ b/tools/electron/src/browser/index.html @@ -11,7 +11,7 @@ } catch (e) {} -