Skip to content

Commit 475fe53

Browse files
committed
refactor: 搜索下浮式 + tab 标签缩至60% + x 按钮更小
- 搜索框改下浮式(absolute 定位浮在会话列表/消息区上方),不占文档流,展开不挤 tab 空间 - 对话 tab 标签 max-width 150px → 90px(60%) - x 关闭按钮 17px → 14px,图标 10px,节约空间 - 658 全绿;实测三项样式正确
1 parent 4fc83ba commit 475fe53

1 file changed

Lines changed: 24 additions & 9 deletions

File tree

styles.css

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
}
3636
.workbuddian-sidebar-header {
3737
flex-shrink: 0;
38+
position: relative;
3839
display: flex;
3940
align-items: center;
4041
gap: var(--workbuddian-gap-xs);
@@ -85,6 +86,7 @@
8586
/* ==================== 标签栏 ==================== */
8687
.workbuddian-tab-bar {
8788
flex-shrink: 0;
89+
position: relative;
8890
display: flex;
8991
align-items: center;
9092
gap: var(--workbuddian-gap-xs);
@@ -93,6 +95,16 @@
9395
overflow-x: auto;
9496
}
9597

98+
/* 标签栏里搜索框:下浮式(浮在消息区上方,不占文档流) */
99+
.workbuddian-tab-bar .workbuddian-search-input {
100+
position: absolute;
101+
top: calc(100% + 4px);
102+
left: var(--workbuddian-gap-lg);
103+
width: 240px;
104+
z-index: 20;
105+
box-shadow: 0 4px 12px rgba(0,0,0,0.18);
106+
}
107+
96108
/* 标签栏横向滚动:细滚动条(hover 才明显),不占高度;标签多时当前对话靠
97109
scrollIntoView 自动滚入可视区(见 tabs.ts),无需额外滚动按钮挤占窄面板 */
98110
.workbuddian-tab-bar::-webkit-scrollbar {
@@ -111,7 +123,7 @@
111123
display: flex;
112124
align-items: center;
113125
gap: var(--workbuddian-gap-sm);
114-
max-width: 150px;
126+
max-width: 90px;
115127
padding: var(--workbuddian-gap-sm) 11px;
116128
border-radius: var(--workbuddian-radius-md);
117129
background: var(--background-secondary);
@@ -160,14 +172,13 @@
160172
display: flex;
161173
align-items: center;
162174
justify-content: center;
163-
width: 17px;
164-
height: 17px;
175+
width: 14px;
176+
height: 14px;
165177
border-radius: var(--workbuddian-radius-sm);
166-
font-size: 14px;
167-
font-weight: bold;
168-
opacity: 0.5;
178+
opacity: 0.4;
169179
transition: opacity 0.18s ease, background-color 0.18s ease;
170180
}
181+
.workbuddian-tab-close svg { width: 10px; height: 10px; }
171182

172183
.workbuddian-tab-close:hover {
173184
opacity: 1;
@@ -216,11 +227,15 @@
216227
color: var(--text-normal);
217228
font-size: var(--font-ui-smaller);
218229
}
219-
/* dual-pane 侧栏 header 里搜索框填满 */
230+
/* dual-pane 侧栏 header 里搜索框:下浮式(浮在会话列表上方,不占文档流) */
220231
.workbuddian-sidebar-header .workbuddian-search-input {
221-
flex: 1;
232+
position: absolute;
233+
top: calc(100% + 4px);
234+
left: var(--workbuddian-gap-md);
235+
right: var(--workbuddian-gap-md);
222236
width: auto;
223-
min-width: 0;
237+
z-index: 20;
238+
box-shadow: 0 4px 12px rgba(0,0,0,0.18);
224239
}
225240

226241
/* 搜索命中标题高亮 */

0 commit comments

Comments
 (0)