@@ -8,7 +8,6 @@ import { coalesce } from 'vs/base/common/arrays';
88import { DeferredPromise } from 'vs/base/common/async' ;
99import { decodeBase64 } from 'vs/base/common/buffer' ;
1010import { Emitter , Event } from 'vs/base/common/event' ;
11- import { Disposable } from 'vs/base/common/lifecycle' ;
1211import { getExtensionForMimeType } from 'vs/base/common/mime' ;
1312import { FileAccess , Schemas } from 'vs/base/common/network' ;
1413import { equals } from 'vs/base/common/objects' ;
@@ -29,6 +28,8 @@ import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
2928import { IFileService } from 'vs/platform/files/common/files' ;
3029import { IOpenerService , matchesScheme , matchesSomeScheme } from 'vs/platform/opener/common/opener' ;
3130import { IStorageService } from 'vs/platform/storage/common/storage' ;
31+ import { editorFindMatch , editorFindMatchHighlight } from 'vs/platform/theme/common/colorRegistry' ;
32+ import { IThemeService , Themable } from 'vs/platform/theme/common/themeService' ;
3233import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
3334import { IWorkspaceTrustManagementService } from 'vs/platform/workspace/common/workspaceTrust' ;
3435import { asWebviewUri , webviewGenericCspSource } from 'vs/workbench/common/webview' ;
@@ -98,7 +99,7 @@ interface BacklayerWebviewOptions {
9899 readonly outputLineHeight : number ;
99100}
100101
101- export class BackLayerWebView < T extends ICommonCellInfo > extends Disposable {
102+ export class BackLayerWebView < T extends ICommonCellInfo > extends Themable {
102103
103104 private static _originStore ?: WebviewOriginStore ;
104105
@@ -149,8 +150,9 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
149150 @IWorkspaceContextService private readonly workspaceContextService : IWorkspaceContextService ,
150151 @IEditorGroupsService private readonly editorGroupService : IEditorGroupsService ,
151152 @IStorageService private readonly storageService : IStorageService ,
153+ @IThemeService themeService : IThemeService ,
152154 ) {
153- super ( ) ;
155+ super ( themeService ) ;
154156
155157 this . element = document . createElement ( 'div' ) ;
156158
@@ -247,6 +249,8 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
247249 this . nonce ) ;
248250
249251 const enableCsp = this . configurationService . getValue ( 'notebook.experimental.enableCsp' ) ;
252+ const findHighlight = this . getColor ( editorFindMatch ) ;
253+ const currentMatchHighlight = this . getColor ( editorFindMatchHighlight ) ;
250254 return /* html */ `
251255 <html lang="en">
252256 <head>
@@ -264,11 +268,11 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
264268 ">` : '' }
265269 <style nonce="${ this . nonce } ">
266270 ::highlight(find-highlight) {
267- background-color: var(--vscode-editor-findMatchHighlightBackground );
271+ background-color: var(--vscode-editor-findMatchBackground, ${ findHighlight } );
268272 }
269273
270274 ::highlight(current-find-highlight) {
271- background-color: var(--vscode-editor-findMatchBackground );
275+ background-color: var(--vscode-editor-findMatchHighlightBackground, ${ currentMatchHighlight } );
272276 }
273277
274278 #container .cell_container {
0 commit comments