Move button border to css var and ensure consistent height regardless of theme defined border (#169331)

Move button border to css variables and ensure consistent height with/without border
This commit is contained in:
David Dossett 2022-12-15 14:14:28 -08:00 committed by GitHub
parent c0aa5bbb84
commit 0de34523fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -13,6 +13,7 @@
cursor: pointer;
justify-content: center;
align-items: center;
border: 1px solid var(--vscode-button-border, transparent);
}
.monaco-text-button:focus {

View file

@ -82,13 +82,10 @@ export class Button extends Disposable implements IButton {
const background = options.secondary ? options.buttonSecondaryBackground : options.buttonBackground;
const foreground = options.secondary ? options.buttonSecondaryForeground : options.buttonForeground;
const border = options.buttonBorder;
this._element.style.color = foreground || '';
this._element.style.backgroundColor = background || '';
if (border) {
this._element.style.border = `1px solid ${border}`;
}
container.appendChild(this._element);