Skip to content

Commit 1d2af09

Browse files
author
Miguel Solorio
committed
Update notebook cell styles for light themes
1 parent 0be16f7 commit 1d2af09

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

extensions/theme-defaults/themes/light_defaults.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
"statusBarItem.remoteForeground": "#FFF",
2020
"statusBarItem.remoteBackground": "#16825D",
2121
"sideBarSectionHeader.background": "#0000",
22-
"sideBarSectionHeader.border": "#61616130"
22+
"sideBarSectionHeader.border": "#61616130",
23+
"notebook.cellFocusBackground": "#c8ddf150",
24+
"notebook.cellBorderColor": "#dae3e9",
25+
"notebook.outputContainerBackgroundColor": "#c8ddf150",
26+
"notebook.focusedCellShadow": "#00315040"
2327
},
2428
"semanticHighlighting": true
2529
}

src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c
2323
import { IResourceEditorInput } from 'vs/platform/editor/common/editor';
2424
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
2525
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
26-
import { contrastBorder, editorBackground, focusBorder, foreground, registerColor, textBlockQuoteBackground, textBlockQuoteBorder, textLinkActiveForeground, textLinkForeground, textPreformatForeground, errorForeground, transparent } from 'vs/platform/theme/common/colorRegistry';
26+
import { contrastBorder, editorBackground, focusBorder, foreground, registerColor, textBlockQuoteBackground, textBlockQuoteBorder, textLinkActiveForeground, textLinkForeground, textPreformatForeground, errorForeground, transparent, widgetShadow, listFocusBackground, listInactiveSelectionBackground } from 'vs/platform/theme/common/colorRegistry';
2727
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
2828
import { EditorMemento } from 'vs/workbench/browser/parts/editor/baseEditor';
2929
import { EditorOptions, IEditorMemento } from 'vs/workbench/common/editor';
@@ -1308,7 +1308,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
13081308

13091309
export const notebookCellBorder = registerColor('notebook.cellBorderColor', {
13101310
dark: transparent(PANEL_BORDER, .4),
1311-
light: transparent(PANEL_BORDER, .3),
1311+
light: transparent(listInactiveSelectionBackground, 1),
13121312
hc: PANEL_BORDER
13131313
}, nls.localize('notebook.cellBorderColor', "The border color for notebook cells."));
13141314

@@ -1338,7 +1338,7 @@ export const cellStatusIconRunning = registerColor('notebookStatusRunningIcon.fo
13381338

13391339
export const notebookOutputContainerColor = registerColor('notebook.outputContainerBackgroundColor', {
13401340
dark: notebookCellBorder,
1341-
light: notebookCellBorder,
1341+
light: transparent(listFocusBackground, .4),
13421342
hc: null
13431343
}, nls.localize('notebook.outputContainerBackgroundColor', "The Color of the notebook output container background."));
13441344

@@ -1351,13 +1351,13 @@ export const CELL_TOOLBAR_SEPERATOR = registerColor('notebook.cellToolbarSeperat
13511351

13521352
export const cellFocusBackground = registerColor('notebook.cellFocusBackground', {
13531353
dark: transparent(PANEL_BORDER, .4),
1354-
light: transparent(PANEL_BORDER, .3),
1354+
light: transparent(listFocusBackground, .4),
13551355
hc: PANEL_BORDER
13561356
}, nls.localize('cellFocusBackground', "The background color of focused or hovered cells"));
13571357

13581358
export const focusedCellShadow = registerColor('notebook.focusedCellShadow', {
1359-
dark: Color.black.transparent(0.6),
1360-
light: Color.black.transparent(0.04),
1359+
dark: transparent(widgetShadow, 0.6),
1360+
light: transparent(widgetShadow, 0.4),
13611361
hc: Color.transparent
13621362
}, nls.localize('cellShadow', "The color of the shadow on the focused or hovered cell"));
13631363

@@ -1503,10 +1503,10 @@ registerThemingParticipant((theme, collector) => {
15031503
const cellShadowColor = theme.getColor(focusedCellShadow);
15041504
if (cellShadowColor) {
15051505
// Code cells
1506-
collector.addRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.focused .cell-shadow { box-shadow: 0px 1px 4px 2px ${cellShadowColor} }`);
1506+
collector.addRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.focused .cell-shadow { box-shadow: 0px 0px 4px 2px ${cellShadowColor} }`);
15071507

15081508
// Markdown cells
1509-
collector.addRule(`.monaco-workbench .notebookOverlay .monaco-list .markdown-cell-row.focused { box-shadow: 0px 1px 4px 2px ${cellShadowColor} }`);
1509+
collector.addRule(`.monaco-workbench .notebookOverlay .monaco-list .markdown-cell-row.focused { box-shadow: 0px 0px 4px 2px ${cellShadowColor} }`);
15101510
}
15111511

15121512
const cellInsertionIndicatorColor = theme.getColor(cellInsertionIndicator);

0 commit comments

Comments
 (0)