mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
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:
parent
c0aa5bbb84
commit
0de34523fa
|
@ -13,6 +13,7 @@
|
|||
cursor: pointer;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid var(--vscode-button-border, transparent);
|
||||
}
|
||||
|
||||
.monaco-text-button:focus {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue