Fix stack cover: shared sticky line, z-index, show body only on stack.
All folders stick at --stack-reveal; higher layers paint over lower ones. Bodies hidden until panel aligns on the stack line (no vertical list). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+20
-24
@@ -60,14 +60,18 @@ body { font-family: var(--sans); background: #2a2824; color: #1a1814; }
|
||||
padding: var(--stack-nav) 1rem 0;
|
||||
}
|
||||
|
||||
/* Whole folder sticks; tab staggered via folder top; bodies align to reveal */
|
||||
/* All folders stick at same line — higher z-index covers previous card */
|
||||
.folder {
|
||||
position: sticky;
|
||||
top: var(--stack-reveal);
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.tab {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 100%;
|
||||
margin-bottom: 0;
|
||||
display: block;
|
||||
width: fit-content;
|
||||
max-width: calc(100% - 1rem);
|
||||
@@ -90,40 +94,32 @@ body { font-family: var(--sans); background: #2a2824; color: #1a1814; }
|
||||
.body {
|
||||
background: #e8e2d4;
|
||||
border: 1px solid #c4b8a8;
|
||||
border-top: none;
|
||||
border-radius: 0 10px 10px 10px;
|
||||
padding: 1.25rem 1.4rem 2rem;
|
||||
min-height: var(--stack-body-h);
|
||||
box-shadow: 0 10px 32px rgba(0,0,0,0.25);
|
||||
}
|
||||
|
||||
.f0 { top: calc(var(--stack-stick) + var(--stack-step) * 0); }
|
||||
.f0 .tab { margin-left: calc(var(--tab-offset) * 0); background: #c9a86c; color: #2a2824; }
|
||||
.f0 .body { margin-top: calc(var(--stack-reveal) - var(--stack-stick) - var(--stack-tab-h)); }
|
||||
.f0 { z-index: 10; }
|
||||
.f0 .tab { margin-left: calc(var(--tab-offset) * 0); bottom: calc(100% + var(--stack-step) * 0); background: #c9a86c; color: #2a2824; }
|
||||
|
||||
.f1 { top: calc(var(--stack-stick) + var(--stack-step) * 1); }
|
||||
.f1 .tab { margin-left: calc(var(--tab-offset) * 1); background: #a8c4d4; color: #1a2830; }
|
||||
.f1 .body { margin-top: calc(var(--stack-reveal) - var(--stack-stick) - var(--stack-step) * 1 - var(--stack-tab-h)); }
|
||||
.f1 { z-index: 11; }
|
||||
.f1 .tab { margin-left: calc(var(--tab-offset) * 1); bottom: calc(100% + var(--stack-step) * 1); background: #a8c4d4; color: #1a2830; }
|
||||
|
||||
.f2 { top: calc(var(--stack-stick) + var(--stack-step) * 2); }
|
||||
.f2 .tab { margin-left: calc(var(--tab-offset) * 2); background: #b8d4a8; color: #1a2818; }
|
||||
.f2 .body { margin-top: calc(var(--stack-reveal) - var(--stack-stick) - var(--stack-step) * 2 - var(--stack-tab-h)); }
|
||||
.f2 { z-index: 12; }
|
||||
.f2 .tab { margin-left: calc(var(--tab-offset) * 2); bottom: calc(100% + var(--stack-step) * 2); background: #b8d4a8; color: #1a2818; }
|
||||
|
||||
.f3 { top: calc(var(--stack-stick) + var(--stack-step) * 3); }
|
||||
.f3 .tab { margin-left: calc(var(--tab-offset) * 3); background: #d4b8c4; color: #2a1820; }
|
||||
.f3 .body { margin-top: calc(var(--stack-reveal) - var(--stack-stick) - var(--stack-step) * 3 - var(--stack-tab-h)); }
|
||||
.f3 { z-index: 13; }
|
||||
.f3 .tab { margin-left: calc(var(--tab-offset) * 3); bottom: calc(100% + var(--stack-step) * 3); background: #d4b8c4; color: #2a1820; }
|
||||
|
||||
.f4 { top: calc(var(--stack-stick) + var(--stack-step) * 4); }
|
||||
.f4 .tab { margin-left: calc(var(--tab-offset) * 4); background: #d4c8a8; color: #2a2418; }
|
||||
.f4 .body { margin-top: calc(var(--stack-reveal) - var(--stack-stick) - var(--stack-step) * 4 - var(--stack-tab-h)); }
|
||||
.f4 { z-index: 14; }
|
||||
.f4 .tab { margin-left: calc(var(--tab-offset) * 4); bottom: calc(100% + var(--stack-step) * 4); background: #d4c8a8; color: #2a2418; }
|
||||
|
||||
.f5 { top: calc(var(--stack-stick) + var(--stack-step) * 5); }
|
||||
.f5 .tab { margin-left: calc(var(--tab-offset) * 5); background: #c4c4c4; color: #2a2a2a; }
|
||||
.f5 .body { margin-top: calc(var(--stack-reveal) - var(--stack-stick) - var(--stack-step) * 5 - var(--stack-tab-h)); }
|
||||
.f5 { z-index: 15; }
|
||||
.f5 .tab { margin-left: calc(var(--tab-offset) * 5); bottom: calc(100% + var(--stack-step) * 5); background: #c4c4c4; color: #2a2a2a; }
|
||||
|
||||
.f6 { top: calc(var(--stack-stick) + var(--stack-step) * 6); }
|
||||
.f6 .tab { margin-left: calc(var(--tab-offset) * 6); background: #2a4a6b; color: #e8e2d4; }
|
||||
.f6 .body { margin-top: calc(var(--stack-reveal) - var(--stack-stick) - var(--stack-step) * 6 - var(--stack-tab-h)); }
|
||||
.f6 { z-index: 16; }
|
||||
.f6 .tab { margin-left: calc(var(--tab-offset) * 6); bottom: calc(100% + var(--stack-step) * 6); background: #2a4a6b; color: #e8e2d4; }
|
||||
|
||||
.body h1 { font-size: 1.65rem; margin-bottom: 0.35rem; }
|
||||
.body h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }
|
||||
|
||||
Reference in New Issue
Block a user