Skip to content

Commit 3807229

Browse files
author
Benjamin Pasero
committed
1 parent 0110d49 commit 3807229

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/vs/workbench/browser/parts/editor/tabsTitleControl.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,24 @@ export class TabsTitleControl extends TitleControl {
295295
tabContainer.setAttribute('aria-selected', 'true');
296296
tabContainer.style.backgroundColor = this.getColor(TAB_ACTIVE_BACKGROUND);
297297
tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_ACTIVE_FOREGROUND : TAB_UNFOCUSED_ACTIVE_FOREGROUND);
298-
tabContainer.style.borderBottomColor = this.getColor(isGroupActive ? TAB_ACTIVE_BORDER : TAB_UNFOCUSED_ACTIVE_BORDER);
298+
299+
// Use boxShadow for the active tab border because if we also have a editor group header
300+
// color, the two colors would collide and the tab border never shows up.
301+
// see https://github.com/Microsoft/vscode/issues/33111
302+
const activeTabBorderColor = this.getColor(isGroupActive ? TAB_ACTIVE_BORDER : TAB_UNFOCUSED_ACTIVE_BORDER);
303+
if (activeTabBorderColor) {
304+
tabContainer.style.boxShadow = `${activeTabBorderColor} 0 -1px inset`;
305+
} else {
306+
tabContainer.style.boxShadow = null;
307+
}
299308

300309
this.activeTab = tabContainer;
301310
} else {
302311
DOM.removeClass(tabContainer, 'active');
303312
tabContainer.setAttribute('aria-selected', 'false');
304313
tabContainer.style.backgroundColor = this.getColor(TAB_INACTIVE_BACKGROUND);
305314
tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_INACTIVE_FOREGROUND : TAB_UNFOCUSED_INACTIVE_FOREGROUND);
306-
tabContainer.style.borderBottomColor = null;
315+
tabContainer.style.boxShadow = null;
307316
}
308317

309318
// Dirty State

0 commit comments

Comments
 (0)