Files
hatty/src/renderer/css/tabs.css
T

102 lines
1.8 KiB
CSS

/* 标签栏 */
.tab-bar {
display: flex;
align-items: center;
gap: 4px;
overflow-x: auto;
scrollbar-width: none;
max-width: calc(100vw - 320px);
-webkit-app-region: no-drag;
}
.tab-bar::-webkit-scrollbar {
display: none;
}
.tab-item {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
height: 28px;
background: var(--bg-tab-inactive);
border-radius: var(--border-radius-sm);
font-size: 12px;
font-weight: 500;
color: var(--text-muted);
cursor: pointer;
border: 1px solid transparent;
transition: all 0.15s ease;
white-space: nowrap;
max-width: 180px;
min-width: 90px;
}
.tab-item:hover {
background: var(--bg-tab-hover);
color: var(--text-main);
}
.tab-item.active {
background: var(--bg-tab-active);
color: var(--text-bright);
border-color: var(--border-active);
box-shadow: 0 0 10px var(--accent-glow);
}
.tab-icon {
width: 12px;
height: 12px;
opacity: 0.8;
}
.tab-title {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tab-close {
display: flex;
align-items: center;
justify-content: center;
width: 14px;
height: 14px;
border-radius: 50%;
opacity: 0;
transition: all 0.12s ease;
}
.tab-item:hover .tab-close,
.tab-item.active .tab-close {
opacity: 0.6;
}
.tab-close:hover {
opacity: 1 !important;
background: rgba(255, 255, 255, 0.15);
color: #f7768e;
}
.new-tab-btn {
background: transparent;
border: none;
color: var(--text-muted);
width: 26px;
height: 26px;
border-radius: var(--border-radius-sm);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.15s ease;
flex-shrink: 0;
-webkit-app-region: no-drag;
}
.new-tab-btn:hover {
background: var(--btn-hover, rgba(255, 255, 255, 0.08));
color: var(--accent-color);
}