fix(panel): prevent top pill nav overflow in narrow sidebar via minmax(0, 1fr) and @container stages

This commit is contained in:
fish
2026-11-18 12:56:51 +09:00
parent 336f9ddd55
commit c948126c96
8 changed files with 120 additions and 23 deletions
+54 -9
View File
@@ -488,13 +488,15 @@ html[data-standalone="true"] .app-shell {
/* --- 2. 顶部药丸导航栏 (Top Long-Pill Navigation Bar) --- */
.long-pill-nav {
position: relative;
container-type: inline-size;
display: grid;
grid-template-columns: repeat(var(--pill-count, 4), 1fr);
grid-template-columns: repeat(var(--pill-count, 4), minmax(0, 1fr));
align-items: center;
padding: 3px;
background: var(--surface-panel);
border: 1px solid var(--border-hairline);
border-radius: var(--radius-pill);
overflow: hidden;
user-select: none;
}
@@ -520,6 +522,7 @@ html[data-standalone="true"] .app-shell {
align-items: center;
justify-content: center;
gap: 5px;
min-width: 0;
min-height: calc(26px * var(--ui-font-scale, 1));
padding: 2px var(--space-2);
border: none;
@@ -529,6 +532,7 @@ html[data-standalone="true"] .app-shell {
font-weight: 500;
line-height: 1.15;
border-radius: var(--radius-pill);
overflow: hidden;
cursor: pointer;
white-space: nowrap;
transition: color var(--dur-instant) var(--ease-fast);
@@ -542,20 +546,60 @@ html[data-standalone="true"] .app-shell {
flex-shrink: 0;
}
.pill-tab-label,
.pill-tab-badge {
display: inline-flex;
align-items: center;
min-height: 14px;
line-height: 1.15;
.pill-tab-label {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.2;
}
.pill-tab-badge {
display: inline-flex;
align-items: center;
flex-shrink: 0;
min-height: 14px;
line-height: 1.15;
margin-left: -2px;
font-size: var(--fs-base-sm);
opacity: 0.85;
}
@container (max-width: 30em) {
.pill-tab {
gap: 3.5px;
padding: 2px 4px;
font-size: var(--fs-md);
}
.pill-tab .svg-icon {
width: 13px;
height: 13px;
}
.pill-tab-badge {
display: none !important;
}
}
@container (max-width: 23em) {
.pill-tab {
gap: 0;
padding: 2px 3px;
}
.pill-tab .svg-icon {
display: none;
}
}
@container (max-width: 17.5em) {
.pill-tab .svg-icon {
display: block;
}
.pill-tab-label {
display: none;
}
}
.pill-tab:hover {
color: var(--text-primary);
}
@@ -1680,7 +1724,7 @@ html[data-standalone="true"] .app-shell {
/* --- 4. 上下文双列图例网格 (Context 10-Channel Legend Grid) --- */
.ctx-legend-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 5px var(--space-4);
padding: 2px 0 0 0;
background: transparent;
@@ -1693,6 +1737,7 @@ html[data-standalone="true"] .app-shell {
align-items: center;
justify-content: space-between;
gap: var(--space-2);
min-width: 0;
}
.legend-left {
@@ -1900,7 +1945,7 @@ html[data-standalone="true"] .app-shell {
.cons-split-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cons-matrix-bottom {