@@ -27,19 +27,39 @@ export class DaoTabItem extends CrLitElement {
2727 cursor: default;
2828 gap: 8px;
2929 position: relative;
30- transition: background 0.15s ease;
30+ transition: background 0.12s ease, box-shadow 0.12s ease;
3131 }
3232
3333 .tab-row:hover {
34- background: var(--ink-drop);
34+ background: var(--ink-drop-strong, rgba(0, 0, 0, 0.06) );
3535 }
3636
37- :host([active]) .tab-row {
37+ /* Active state — explicitly defined for both hover and non-hover to
38+ * defend against CSS specificity edge cases and ensure the active
39+ * row never reverts to the hover background. The accent-tinted
40+ * hairline ring gives the active tab a clear boundary so users can
41+ * distinguish it from the surrounding sidebar even when the
42+ * translucent white surface blends into a light background. */
43+ :host([active]) .tab-row,
44+ :host([active]) .tab-row:hover {
3845 background: var(--surface-active);
39- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
46+ box-shadow: 0 0 0 0.5px rgba(70, 120, 190, 0.24),
47+ 0 1px 3px rgba(0, 0, 0, 0.10),
4048 0 1px 2px rgba(0, 0, 0, 0.06);
4149 }
4250
51+ @media (prefers-color-scheme: dark) {
52+ .tab-row:hover {
53+ background: var(--ink-drop-strong, rgba(255, 255, 255, 0.10));
54+ }
55+ :host([active]) .tab-row,
56+ :host([active]) .tab-row:hover {
57+ box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.14),
58+ 0 1px 3px rgba(0, 0, 0, 0.30),
59+ 0 1px 2px rgba(0, 0, 0, 0.18);
60+ }
61+ }
62+
4363 .favicon {
4464 width: 16px;
4565 height: 16px;
@@ -91,6 +111,15 @@ export class DaoTabItem extends CrLitElement {
91111 color: var(--text-primary);
92112 }
93113
114+ /* Reaffirm title color under active state. Defensive: keeps text
115+ * legible even if a stale CSS variable from a media-query transition
116+ * briefly leaks (e.g. system theme auto-switch) and prevents
117+ * "white-on-white" symptoms on the near-white active surface. */
118+ :host([active]) .title {
119+ color: var(--text-primary);
120+ font-weight: 500;
121+ }
122+
94123 .audio-btn {
95124 width: 16px;
96125 height: 16px;
0 commit comments