Skip to content

Commit 5b29fce

Browse files
authored
Fix bug in polyfill + change terminal color (codesandbox#3579)
1 parent 394c371 commit 5b29fce

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/common/src/themes/codesandbox-black.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ const colors = {
250250
unfocusedInactiveForeground: tokens.grays[400],
251251
},
252252
terminal: {
253-
background: tokens.grays[900],
253+
background: tokens.grays[700],
254254
foreground: tokens.white,
255255
ansiBrightBlack: tokens.blues[700],
256256
ansiBrightRed: tokens.reds[500],

packages/components/src/utils/polyfill-theme.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ const polyfillTheme = vsCodeTheme => {
4040

4141
const type = vsCodeTheme.type || guessType(vsCodeTheme);
4242

43+
// Step 0: Clone theme to make sure we don't modify the source
44+
const clonedVsCodeTheme = deepmerge({ colors: {} }, vsCodeTheme.colors || {});
45+
4346
// Step 1: Initialise with vscode theme
44-
const vsCodeColors = dot.object(vsCodeTheme.colors || {});
47+
const vsCodeColors = dot.object(clonedVsCodeTheme.colors);
4548
uiColors = deepmerge(uiColors, vsCodeColors);
4649

4750
// Step 2: Fill missing values from existing values or codesandbox dark/light
@@ -162,6 +165,7 @@ const polyfillTheme = vsCodeTheme => {
162165
selectedForeground: uiColors.sideBar.foreground,
163166
inactiveForeground: mutedForeground,
164167
hoverBackground: uiColors.sideBar.border,
168+
border: uiColors.sideBar.border,
165169
},
166170
avatar: { border: uiColors.sideBar.border },
167171
sideBar: { hoverBackground: uiColors.sideBar.border },

0 commit comments

Comments
 (0)