feat(selectBox): inherit font size from select button for dropdown consistency

This commit is contained in:
mrleemurray
2026-02-25 15:03:43 +00:00
parent 0f53f0e0eb
commit 40db213e28

View File

@@ -515,6 +515,12 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
private renderSelectDropDown(container: HTMLElement, preLayoutPosition?: boolean): IDisposable {
container.appendChild(this.selectDropDownContainer);
// Inherit font-size from the select button so the dropdown matches
const computedFontSize = dom.getWindow(this.selectElement).getComputedStyle(this.selectElement).fontSize;
if (computedFontSize) {
this.selectDropDownContainer.style.fontSize = computedFontSize;
}
// Pre-Layout allows us to change position
this.layoutSelectDropDown(preLayoutPosition);