Remove notebook cell shadow

This commit is contained in:
Rob Lourens 2020-07-08 14:58:42 -07:00
parent 5d465637b6
commit ab497b9464
4 changed files with 3 additions and 42 deletions

View file

@ -22,8 +22,7 @@
"sideBarSectionHeader.border": "#61616130",
"notebook.focusedCellBackground": "#c8ddf150",
"notebook.cellBorderColor": "#dae3e9",
"notebook.outputContainerBackgroundColor": "#c8ddf150",
"notebook.focusedCellShadow": "#00315040"
"notebook.outputContainerBackgroundColor": "#c8ddf150"
},
"semanticHighlighting": true
}

View file

@ -417,23 +417,6 @@
outline: none !important;
}
.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-shadow-container {
height: 10px;
left: 0px;
right: 0px;
overflow: hidden;
position: absolute;
}
.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-shadow-container-top {
top: -10px;
}
.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-shadow-top {
margin-top: 10px;
width: 100%;
}
.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator {
display: block;
content: ' ';

View file

@ -23,7 +23,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c
import { IResourceEditorInput } from 'vs/platform/editor/common/editor';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { contrastBorder, editorBackground, focusBorder, foreground, registerColor, textBlockQuoteBackground, textBlockQuoteBorder, textLinkActiveForeground, textLinkForeground, textPreformatForeground, errorForeground, transparent, widgetShadow, listFocusBackground, listInactiveSelectionBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from 'vs/platform/theme/common/colorRegistry';
import { contrastBorder, editorBackground, focusBorder, foreground, registerColor, textBlockQuoteBackground, textBlockQuoteBorder, textLinkActiveForeground, textLinkForeground, textPreformatForeground, errorForeground, transparent, listFocusBackground, listInactiveSelectionBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from 'vs/platform/theme/common/colorRegistry';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { EditorMemento } from 'vs/workbench/browser/parts/editor/baseEditor';
import { EditorOptions, IEditorMemento } from 'vs/workbench/common/editor';
@ -1373,12 +1373,6 @@ export const focusedCellBorder = registerColor('notebook.focusedCellBorder', {
hc: focusBorder
}, nls.localize('notebook.focusedCellBorder', "The color of the cell's top and bottom border when the cell is focused."));
export const focusedCellShadow = registerColor('notebook.focusedCellShadow', {
dark: transparent(widgetShadow, 0.6),
light: transparent(widgetShadow, 0.4),
hc: Color.transparent
}, nls.localize('notebook.focusedCellShadow', "The color of the cell shadow when cells are focused."));
export const cellStatusBarItemHover = registerColor('notebook.cellStatusBarItemHoverBackground', {
light: new Color(new RGBA(0, 0, 0, 0.08)),
dark: new Color(new RGBA(255, 255, 255, 0.15)),
@ -1542,15 +1536,6 @@ registerThemingParticipant((theme, collector) => {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-language-picker:hover { background-color: ${cellStatusBarHoverBg}; }`);
}
const cellShadowColor = theme.getColor(focusedCellShadow);
if (cellShadowColor) {
// Code cells
collector.addRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.focused .cell-shadow { box-shadow: 0px 0px 4px 2px ${cellShadowColor} }`);
// Markdown cells
collector.addRule(`.monaco-workbench .notebookOverlay .monaco-list .markdown-cell-row.focused { box-shadow: 0px 0px 4px 2px ${cellShadowColor} }`);
}
const cellInsertionIndicatorColor = theme.getColor(cellInsertionIndicator);
if (cellInsertionIndicatorColor) {
collector.addRule(`.notebookOverlay > .cell-list-container > .cell-list-insertion-indicator { background-color: ${cellInsertionIndicatorColor}; }`);

View file

@ -871,10 +871,7 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
const disposables = new DisposableStore();
const contextKeyService = disposables.add(this.contextKeyServiceProvider(container));
const focusIndicatorTop = DOM.append(container, $('.cell-focus-indicator.cell-focus-indicator-top'));
DOM.append(
DOM.append(focusIndicatorTop, $('.cell-shadow-container.cell-shadow-container-top')),
$('.cell-shadow.cell-shadow-top'));
DOM.append(container, $('.cell-focus-indicator.cell-focus-indicator-top'));
const toolbar = disposables.add(this.createToolbar(container));
const focusIndicator = DOM.append(container, DOM.$('.cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-left'));
focusIndicator.setAttribute('draggable', 'true');
@ -923,9 +920,6 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
DOM.append(bottomCellContainer, $('.separator'));
const focusIndicatorBottom = DOM.append(container, $('.cell-focus-indicator.cell-focus-indicator-bottom'));
DOM.append(
DOM.append(focusIndicatorBottom, $('.cell-shadow-container.cell-shadow-container-bottom')),
$('.cell-shadow.cell-shadow-bottom'));
const templateData: CodeCellRenderTemplate = {
contextKeyService,