Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)

* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998

* fix pipelines

* fix strict-null-checks

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-21 22:12:22 -07:00
committed by GitHub
parent 7c9be74970
commit 1e22f47304
913 changed files with 18898 additions and 16536 deletions

View File

@@ -131,22 +131,22 @@ export class DropdownList extends Dropdown {
}
protected applyStyles(): void {
const background = this.backgroundColor ? this.backgroundColor.toString() : null;
const foreground = this.foregroundColor ? this.foregroundColor.toString() : null;
const border = this.borderColor ? this.borderColor.toString() : null;
const background = this.backgroundColor ? this.backgroundColor.toString() : '';
const foreground = this.foregroundColor ? this.foregroundColor.toString() : '';
const border = this.borderColor ? this.borderColor.toString() : '';
this.applyStylesOnElement(this._contentContainer, background, foreground, border);
if (this.label) {
this.applyStylesOnElement(this.element, background, foreground, border);
}
}
private applyStylesOnElement(element: HTMLElement, background: string | null, foreground: string | null, border: string | null): void {
private applyStylesOnElement(element: HTMLElement, background: string, foreground: string, border: string): void {
if (element) {
element.style.backgroundColor = background;
element.style.color = foreground;
element.style.borderWidth = border ? '1px' : null;
element.style.borderStyle = border ? 'solid' : null;
element.style.borderWidth = border ? '1px' : '';
element.style.borderStyle = border ? 'solid' : '';
element.style.borderColor = border;
}
}