Skip to content

Commit f04ba7c

Browse files
authored
Height of common input components is not consistent (microsoft#167098)
Height of common input components is not consistent. Fixes microsoft#167078
1 parent 4ab88b8 commit f04ba7c

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/vs/base/browser/ui/inputbox/inputBox.css

-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
font-size: inherit;
1515
}
1616

17-
.monaco-inputbox.idle {
18-
border: 1px solid transparent;
19-
}
20-
2117
.monaco-inputbox > .ibwrapper > .input,
2218
.monaco-inputbox > .ibwrapper > .mirror {
2319

src/vs/base/browser/ui/inputbox/inputBox.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export class InputBox extends Widget {
377377
this.element.classList.add(this.classForType(message.type));
378378

379379
const styles = this.stylesForType(this.message.type);
380-
this.element.style.border = styles.border ? `1px solid ${styles.border}` : '';
380+
this.element.style.borderColor = styles.border || 'transparent';
381381

382382
if (this.message.content && (this.hasFocus() || force)) {
383383
this._showMessage();
@@ -551,10 +551,10 @@ export class InputBox extends Widget {
551551
this.input.style.backgroundColor = 'inherit';
552552
this.input.style.color = foreground;
553553

554-
if (border) {
555-
this.element.style.border = '1px solid ' + border;
556-
}
557-
554+
// there's always a border, even if the color is not set.
555+
this.element.style.borderColor = border || 'transparent';
556+
this.element.style.borderWidth = '1px';
557+
this.element.style.borderStyle = 'solid';
558558
}
559559

560560
public layout(): void {

0 commit comments

Comments
 (0)