From 88f49996919636b57fc14be3e19708fa838c1255 Mon Sep 17 00:00:00 2001 From: zipg Date: Thu, 10 Sep 2026 14:30:34 +0800 Subject: [PATCH] style(tabs): simplify classic compact active tab state --- .../layout/__tests__/EditorGroupTabBar.groups.spec.ts | 3 +++ apps/desktop/src/components/layout/appTabBar.css | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/apps/desktop/src/components/layout/__tests__/EditorGroupTabBar.groups.spec.ts b/apps/desktop/src/components/layout/__tests__/EditorGroupTabBar.groups.spec.ts index 1073053a98..bb2a1c4faf 100644 --- a/apps/desktop/src/components/layout/__tests__/EditorGroupTabBar.groups.spec.ts +++ b/apps/desktop/src/components/layout/__tests__/EditorGroupTabBar.groups.spec.ts @@ -159,6 +159,9 @@ describe("EditorGroupTabBar semantic tab groups", () => { expect(sharedStyles).toContain(".app-tab-bar:not(.vertical-tab-layout) .tab-group-header"); expect(sharedStyles).toMatch(/\.app-tab-bar\.classic-tab-layout:not\(\.vertical-tab-layout\) \.tab-group-header-content\s*\{[^}]*height:\s*100%;[^}]*border-radius:\s*0;/s); expect(sharedStyles).toMatch(/\.app-tab-bar\.classic-tab-layout:not\(\.vertical-tab-layout\):not\(:has\(\.wrap-mode\)\)\[data-group-mode="none"\] \.app-tab-pill\s*\{[^}]*border-right-width:\s*0\.5px;/s); + expect(sharedStyles).toMatch( + /\.app-tab-bar\.classic-tab-layout:not\(\.vertical-tab-layout\):not\(:has\(\.wrap-mode\)\)\[data-placement="top"\]\[data-group-mode="none"\] \.app-tab-pill\[data-active-tab="true"\]\s*\{[^}]*border-top-color:\s*transparent;[^}]*border-right-color:\s*transparent;[^}]*border-left-color:\s*transparent;/s, + ); expect(sharedStyles).toMatch(/\.tab-overflow-control\s*\{[^}]*width:\s*34px;[^}]*flex:\s*0 0 34px;/s); expect(sharedStyles).toContain("padding-inline-end: 2.125rem;"); expect(sharedStyles).toContain("inset-inline-end: 2.125rem;"); diff --git a/apps/desktop/src/components/layout/appTabBar.css b/apps/desktop/src/components/layout/appTabBar.css index 8af65eeb3e..c4a72ae57e 100644 --- a/apps/desktop/src/components/layout/appTabBar.css +++ b/apps/desktop/src/components/layout/appTabBar.css @@ -593,6 +593,15 @@ border-right-width: 0.5px; } +/* In the default classic single-row layout, the bottom indicator is enough to + * identify the active tab. Remove its surrounding three-sided outline so the + * selected state does not look boxed in. */ +.app-tab-bar.classic-tab-layout:not(.vertical-tab-layout):not(:has(.wrap-mode))[data-placement="top"][data-group-mode="none"] .app-tab-pill[data-active-tab="true"] { + border-top-color: transparent; + border-right-color: transparent; + border-left-color: transparent; +} + .app-tab-bar:not(.vertical-tab-layout) .tab-group-header:hover .tab-group-header-content, .app-tab-bar:not(.vertical-tab-layout) .tab-group-header--active .tab-group-header-content { background: color-mix(in srgb, var(--tab-group-color) 18%, transparent);