Refactor sash hover border to use CSS var (#165516)

Ref #165169
This commit is contained in:
Raymond Zhao 2022-11-04 16:06:26 -07:00 committed by GitHub
parent 0bc4682239
commit 12d2660826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 12 deletions

View file

@ -111,6 +111,11 @@
background: transparent;
}
.monaco-sash.hover:before,
.monaco-sash.active:before {
background: var(--vscode-sash-hoverBorder);
}
.monaco-sash.vertical:before {
width: var(--sash-hover-size);
left: calc(50% - (var(--sash-hover-size) / 2));

View file

@ -10,8 +10,6 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { SashSettingsController } from 'vs/workbench/contrib/sash/browser/sash';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { sashHoverBorder } from 'vs/platform/theme/common/colorRegistry';
import { isIOS } from 'vs/base/common/platform';
// Sash size contribution
@ -39,13 +37,3 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
},
}
});
registerThemingParticipant((theme, collector) => {
const sashHoverBorderColor = theme.getColor(sashHoverBorder);
collector.addRule(`
.monaco-sash.hover:before,
.monaco-sash.active:before {
background: ${sashHoverBorderColor};
}
`);
});