Skip to content

Commit abfb1f6

Browse files
committed
Cell comments css variables
1 parent c7330bb commit abfb1f6

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

src/vs/workbench/contrib/notebook/browser/media/notebook.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,3 +551,21 @@
551551
.monaco-workbench .notebookOverlay .cell-editor-container .monaco-editor .margin-view-overlays .codicon-folding-collapsed {
552552
margin-left: 0;
553553
}
554+
555+
/** Notebook Cell Comments */
556+
557+
.cell-comment-container.review-widget {
558+
border-left: 1px solid var(--vscode-peekView-border); border-right: 1px solid var(--vscode-peekView-border);
559+
}
560+
561+
.cell-comment-container.review-widget > .head {
562+
border-top: 1px solid var(--vscode-peekView-border);
563+
}
564+
565+
.cell-comment-container.review-widget > .body {
566+
border-bottom: 1px solid var(--vscode-peekView-border);
567+
}
568+
569+
.cell-comment-container.review-widget {
570+
background-color: var(--vscode-peekViewResult-background);
571+
}

src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.ts

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import { coalesce } from 'vs/base/common/arrays';
7+
import { DisposableStore } from 'vs/base/common/lifecycle';
8+
import { EDITOR_FONT_DEFAULTS, IEditorOptions } from 'vs/editor/common/config/editorOptions';
69
import * as languages from 'vs/editor/common/languages';
10+
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
711
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
812
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
13+
import { IThemeService } from 'vs/platform/theme/common/themeService';
14+
import { ICommentService } from 'vs/workbench/contrib/comments/browser/commentService';
15+
import { CommentThreadWidget } from 'vs/workbench/contrib/comments/browser/commentThreadWidget';
916
import { ICellViewModel, INotebookEditorDelegate } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
1017
import { CellPart } from 'vs/workbench/contrib/notebook/browser/view/cellPart';
11-
import { CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon';
1218
import { CodeCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
13-
import { CommentThreadWidget } from 'vs/workbench/contrib/comments/browser/commentThreadWidget';
14-
import { DisposableStore } from 'vs/base/common/lifecycle';
15-
import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
19+
import { CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon';
1620
import { ICellRange } from 'vs/workbench/contrib/notebook/common/notebookRange';
17-
import { ICommentService } from 'vs/workbench/contrib/comments/browser/commentService';
18-
import { coalesce } from 'vs/base/common/arrays';
19-
import { peekViewBorder, peekViewResultsBackground } from 'vs/editor/contrib/peekView/browser/peekView';
20-
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
21-
import { EDITOR_FONT_DEFAULTS, IEditorOptions } from 'vs/editor/common/config/editorOptions';
2221

2322
export class CellComments extends CellPart {
2423
private _initialized: boolean = false;
@@ -176,20 +175,3 @@ export class CellComments extends CellPart {
176175
}
177176
}
178177

179-
registerThemingParticipant((theme, collector) => {
180-
const borderColor = theme.getColor(peekViewBorder);
181-
182-
if (borderColor) {
183-
collector.addRule(`.cell-comment-container.review-widget { border-left: 1px solid ${borderColor}; border-right: 1px solid ${borderColor}; }`);
184-
collector.addRule(`.cell-comment-container.review-widget > .head { border-top: 1px solid ${borderColor}; }`);
185-
collector.addRule(`.cell-comment-container.review-widget > .body { border-bottom: 1px solid ${borderColor}; }`);
186-
}
187-
188-
const peekViewBackground = theme.getColor(peekViewResultsBackground);
189-
if (peekViewBackground) {
190-
collector.addRule(
191-
`.cell-comment-container.review-widget {` +
192-
` background-color: ${peekViewBackground};` +
193-
`}`);
194-
}
195-
});

0 commit comments

Comments
 (0)