Skip to content

Commit

Permalink
Merge pull request #345 from CodinGame/small-fixes
Browse files Browse the repository at this point in the history
Remove some global styles
  • Loading branch information
CGNonofr authored Feb 12, 2024
2 parents 947d006 + 0740714 commit 70d9885
Showing 1 changed file with 88 additions and 45 deletions.
133 changes: 88 additions & 45 deletions scripts/vscode.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2721,10 +2721,54 @@ index ccdbaf9d6bd..77e894faf5c 100644
readonly filesToDiff?: IPathToOpen[];
readonly filesToMerge?: IPathToOpen[];
diff --git a/src/vs/workbench/browser/media/style.css b/src/vs/workbench/browser/media/style.css
index 262745f0ed2..487faffe72e 100644
index 262745f0ed2..3e7660e64ad 100644
--- a/src/vs/workbench/browser/media/style.css
+++ b/src/vs/workbench/browser/media/style.css
@@ -34,22 +34,7 @@
@@ -9,130 +9,99 @@

/* Font Families (with CJK support) */

-.mac { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
-.mac:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
-.mac:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
-.mac:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
-.mac:lang(ko) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
-
-.windows { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
-.windows:lang(zh-Hans) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
-.windows:lang(zh-Hant) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
-.windows:lang(ja) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
-.windows:lang(ko) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
+.mac .part { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
+.mac:lang(zh-Hans) .part { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
+.mac:lang(zh-Hant) .part { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
+.mac:lang(ja) .part { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
+.mac:lang(ko) .part { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
+
+.windows .part { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
+.windows:lang(zh-Hans) .part { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
+.windows:lang(zh-Hant) .part { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
+.windows:lang(ja) .part { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
+.windows:lang(ko) .part { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }

/* Linux: add `system-ui` as first font and not `Ubuntu` to allow other distribution pick their standard OS font */
-.linux { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
-.linux:lang(zh-Hans) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
-.linux:lang(zh-Hant) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
-.linux:lang(ja) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
-.linux:lang(ko) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
+.linux .part { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
+.linux:lang(zh-Hans) .part { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
+.linux:lang(zh-Hant) .part { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
+.linux:lang(ja) .part { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
+.linux:lang(ko) .part { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }

-.mac { --monaco-monospace-font: "SF Mono", Monaco, Menlo, Courier, monospace; }
-.windows { --monaco-monospace-font: Consolas, "Courier New", monospace; }
-.linux { --monaco-monospace-font: "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace; }
+.mac .part { --monaco-monospace-font: "SF Mono", Monaco, Menlo, Courier, monospace; }
+.windows .part { --monaco-monospace-font: Consolas, "Courier New", monospace; }
+.linux .part { --monaco-monospace-font: "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace; }

/* Global Styles */

Expand All @@ -2744,16 +2788,17 @@ index 262745f0ed2..487faffe72e 100644
-}
-
-.monaco-workbench {
+.monaco-workbench .monaco-editor, .monaco-workbench .part {
+.monaco-workbench .part {
font-size: 13px;
line-height: 1.4em;
position: relative;
@@ -58,81 +43,70 @@ body.web {
- position: relative;
- z-index: 1;
- overflow: hidden;
color: var(--vscode-foreground);
}

-.monaco-workbench.web {
+.monaco-workbench.web .monaco-editor, .monaco-workbench.web .part {
+.monaco-workbench.web .part {
touch-action: none; /* Disable browser handling of all panning and zooming gestures. Removes 300ms touch delay. */
}

Expand All @@ -2771,44 +2816,42 @@ index 262745f0ed2..487faffe72e 100644
-}
-
-.monaco-workbench img {
+.monaco-workbench .monaco-editor img, .monaco-workbench .part img {
+.monaco-workbench .part img {
border: 0;
}

-.monaco-workbench label {
+.monaco-workbench .monaco-editor label, .monaco-workbench .part label {
+.monaco-workbench .part label {
cursor: pointer;
}

-.monaco-workbench a {
+.monaco-workbench .monaco-editor a, .monaco-workbench .part a {
+.monaco-workbench .part a {
text-decoration: none;
}

-.monaco-workbench a:active {
+.monaco-workbench .monaco-editor a:active, .monaco-workbench .part a:active {
+.monaco-workbench .part a:active {
color: inherit;
background-color: inherit;
}

-.monaco-workbench a.plain {
+.monaco-workbench .monaco-editor a.plain, .monaco-workbench .part a.plain {
+.monaco-workbench .part a.plain {
color: inherit;
text-decoration: none;
}

-.monaco-workbench a.plain:hover,
-.monaco-workbench a.plain.hover {
+.monaco-workbench .monaco-editor a.plain:hover,
+.monaco-workbench .monaco-editor a.plain.hover,
+.monaco-workbench .part a.plain:hover,
+.monaco-workbench .part a.plain.hover {
color: inherit;
text-decoration: none;
}

-.monaco-workbench input {
+.monaco-workbench .monaco-editor input, .monaco-workbench .part input {
+.monaco-workbench .part input {
color: inherit;
font-family: inherit;
font-size: 100%;
Expand All @@ -2817,50 +2860,50 @@ index 262745f0ed2..487faffe72e 100644
-.monaco-workbench input::placeholder { color: var(--vscode-input-placeholderForeground); }
-.monaco-workbench input::-webkit-input-placeholder { color: var(--vscode-input-placeholderForeground); }
-.monaco-workbench input::-moz-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .monaco-editor input::placeholder, .monaco-workbench .part input::placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .monaco-editor input::-webkit-input-placeholder , .monaco-workbench .part input::-webkit-input-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .monaco-editor input::-moz-placeholder, .monaco-workbench .part input::-moz-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .part input::placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .part input::-webkit-input-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .part input::-moz-placeholder { color: var(--vscode-input-placeholderForeground); }

-.monaco-workbench textarea::placeholder { color: var(--vscode-input-placeholderForeground); }
-.monaco-workbench textarea::-webkit-input-placeholder { color: var(--vscode-input-placeholderForeground); }
-.monaco-workbench textarea::-moz-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .monaco-editor textarea::placeholder, .monaco-workbench .part textarea::placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .monaco-editor textarea::-webkit-input-placeholder, .monaco-workbench .part textarea::-webkit-input-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .monaco-editor textarea::-moz-placeholder, .monaco-workbench .part textarea::-moz-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .part textarea::placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .part textarea::-webkit-input-placeholder { color: var(--vscode-input-placeholderForeground); }
+.monaco-workbench .part textarea::-moz-placeholder { color: var(--vscode-input-placeholderForeground); }

-.monaco-workbench .pointer {
+.monaco-workbench .monaco-editor .pointer, .monaco-workbench .part .pointer {
+.monaco-workbench .part .pointer {
cursor: pointer;
}

-.monaco-workbench.mac.monaco-font-aliasing-antialiased {
+.monaco-workbench.mac.monaco-font-aliasing-antialiased .monaco-editor, .monaco-workbench.mac.monaco-font-aliasing-antialiased .part {
+.monaco-workbench.mac.monaco-font-aliasing-antialiased .part {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

-.monaco-workbench.mac.monaco-font-aliasing-none {
+.monaco-workbench.mac.monaco-font-aliasing-none .monaco-editor, .monaco-workbench.mac.monaco-font-aliasing-none .part {
+.monaco-workbench.mac.monaco-font-aliasing-none .part {
-webkit-font-smoothing: none;
-moz-osx-font-smoothing: unset;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
- .monaco-workbench.mac.monaco-font-aliasing-auto {
+ .monaco-workbench.mac.monaco-font-aliasing-auto .monaco-editor, .monaco-workbench.mac.monaco-font-aliasing-auto .part {
+ .monaco-workbench.mac.monaco-font-aliasing-auto .part {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@@ -167,7 +141,7 @@ body.web {
@@ -167,7 +136,7 @@ body.web {

/* Custom Dropdown (select) Arrows */

-.monaco-workbench select {
+.monaco-workbench .monaco-editor select, .monaco-workbench .part select {
+.monaco-workbench .part select {
font-family: inherit;
appearance: none;
-webkit-appearance: none;
@@ -197,16 +171,16 @@ body.web {
@@ -197,16 +166,16 @@ body.web {

/* Keyboard Focus Indication Styles */

Expand All @@ -2874,25 +2917,25 @@ index 262745f0ed2..487faffe72e 100644
-.monaco-workbench textarea:focus,
-.monaco-workbench input[type="search"]:focus,
-.monaco-workbench input[type="checkbox"]:focus {
+.monaco-workbench .monaco-editor [tabindex="0"]:focus, .monaco-workbench .mpart [tabindex="0"]:focus,,
+.monaco-workbench .monaco-editor [tabindex="-1"]:focus, .monaco-workbench .part [tabindex="-1"]:focus,
+.monaco-workbench .monaco-editor .synthetic-focus, .monaco-workbench .part .synthetic-focus,
+.monaco-workbench .monaco-editor select:focus, .monaco-workbench .part select:focus,
+.monaco-workbench .monaco-editor input[type="button"]:focus,.monaco-workbench .part input[type="button"]:focus,
+.monaco-workbench .monaco-editor input[type="text"]:focus, .monaco-workbench .part input[type="text"]:focus,
+.monaco-workbench .monaco-editor button:focus, .monaco-workbench .part button:focus,
+.monaco-workbench .monaco-editor textarea:focus, .monaco-workbench .part textarea:focus,
+.monaco-workbench .monaco-editor input[type="search"]:focus, .monaco-workbench .part input[type="search"]:focus,
+.monaco-workbench .monaco-editor input[type="checkbox"]:focus, .monaco-workbench .part input[type="checkbox"]:focus {
+.monaco-workbench .mpart [tabindex="0"]:focus,
+.monaco-workbench .part [tabindex="-1"]:focus,
+.monaco-workbench .part .synthetic-focus,
+.monaco-workbench .part select:focus,
+.monaco-workbench .part input[type="button"]:focus,
+.monaco-workbench .part input[type="text"]:focus,
+.monaco-workbench .part button:focus,
+.monaco-workbench .part textarea:focus,
+.monaco-workbench .part input[type="search"]:focus,
+.monaco-workbench .part input[type="checkbox"]:focus {
outline-width: 1px;
outline-style: solid;
outline-offset: -1px;
@@ -219,19 +193,19 @@ body.web {
@@ -219,19 +188,19 @@ body.web {
background: transparent; /* Search input focus fix when in high contrast */
}

-.monaco-workbench input[type="checkbox"]:focus {
+.monaco-workbench .monaco-editor input[type="checkbox"]:focus, .monaco-workbench .part input[type="checkbox"]:focus {
+.monaco-workbench .part input[type="checkbox"]:focus {
outline-offset: 2px;
}

Expand All @@ -2901,16 +2944,16 @@ index 262745f0ed2..487faffe72e 100644
-.monaco-workbench select:active,
-.monaco-workbench input[type="button"]:active,
-.monaco-workbench input[type="checkbox"]:active {
+.monaco-workbench .monaco-editor [tabindex="0"]:active, .monaco-workbench part [tabindex="0"]:active,
+.monaco-workbench .monaco-editor [tabindex="-1"]:active, .monaco-workbench .part [tabindex="-1"]:active,
+.monaco-workbench .monaco-editor select:active, .monaco-workbench .part select:active,
+.monaco-workbench .monaco-editor input[type="button"]:active, .monaco-workbench .part input[type="button"]:active,
+.monaco-workbench .monaco-editor input[type="checkbox"]:active, .monaco-workbench .part input[type="checkbox"]:active {
+.monaco-workbench part [tabindex="0"]:active,
+.monaco-workbench .part [tabindex="-1"]:active,
+.monaco-workbench .part select:active,
+.monaco-workbench .part input[type="button"]:active,
+.monaco-workbench .part input[type="checkbox"]:active {
outline: 0 !important; /* fixes some flashing outlines from showing up when clicking */
}

-.monaco-workbench.mac select:focus {
+.monaco-workbench.mac .monaco-editor select:focus, .monaco-workbench.mac .part select:focus {
+.monaco-workbench.mac .part select:focus {
border-color: transparent; /* outline is a square, but border has a radius, so we avoid this glitch when focused (https://github.com/microsoft/vscode/issues/26045) */
}

Expand Down

0 comments on commit 70d9885

Please sign in to comment.