Restore sticky card stack: stepped top + z-index, fix scroll runway.
Reverts broken is-stuck body hiding and same-top layout from recent fixes. Each layer sticks lower (L0–L6); higher z covers previous card on scroll. Scroll pull was ~2.75rem (page only 1060px) — now 70vh per layer (~4k scroll). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+18
-21
@@ -60,18 +60,14 @@ body { font-family: var(--sans); background: #2a2824; color: #1a1814; }
|
||||
padding: var(--stack-nav) 1rem 0;
|
||||
}
|
||||
|
||||
/* All folders stick at same line — higher z-index covers previous card */
|
||||
/* Card = tab + body; sticky with stepped top; higher z covers previous */
|
||||
.folder {
|
||||
position: sticky;
|
||||
top: var(--stack-reveal);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tab {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 100%;
|
||||
margin-bottom: 0;
|
||||
position: sticky;
|
||||
display: block;
|
||||
width: fit-content;
|
||||
max-width: calc(100% - 1rem);
|
||||
@@ -85,8 +81,8 @@ body { font-family: var(--sans); background: #2a2824; color: #1a1814; }
|
||||
border-radius: 8px 8px 0 0;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
z-index: 60;
|
||||
box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
|
||||
transition: filter 0.15s;
|
||||
}
|
||||
|
||||
.tab:hover { filter: brightness(1.06); }
|
||||
@@ -94,32 +90,33 @@ 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 { z-index: 10; }
|
||||
.f0 .tab { margin-left: calc(var(--tab-offset) * 0); bottom: calc(100% + var(--stack-step) * 0); background: #c9a86c; color: #2a2824; }
|
||||
.f0 { top: calc(var(--stack-stick) + var(--stack-step) * 0); z-index: 10; }
|
||||
.f0 .tab { top: calc(var(--stack-stick) + var(--stack-step) * 0); margin-left: calc(var(--tab-offset) * 0); background: #c9a86c; color: #2a2824; }
|
||||
|
||||
.f1 { z-index: 11; }
|
||||
.f1 .tab { margin-left: calc(var(--tab-offset) * 1); bottom: calc(100% + var(--stack-step) * 1); background: #a8c4d4; color: #1a2830; }
|
||||
.f1 { top: calc(var(--stack-stick) + var(--stack-step) * 1); z-index: 11; }
|
||||
.f1 .tab { top: calc(var(--stack-stick) + var(--stack-step) * 1); margin-left: calc(var(--tab-offset) * 1); background: #a8c4d4; color: #1a2830; }
|
||||
|
||||
.f2 { z-index: 12; }
|
||||
.f2 .tab { margin-left: calc(var(--tab-offset) * 2); bottom: calc(100% + var(--stack-step) * 2); background: #b8d4a8; color: #1a2818; }
|
||||
.f2 { top: calc(var(--stack-stick) + var(--stack-step) * 2); z-index: 12; }
|
||||
.f2 .tab { top: calc(var(--stack-stick) + var(--stack-step) * 2); margin-left: calc(var(--tab-offset) * 2); background: #b8d4a8; color: #1a2818; }
|
||||
|
||||
.f3 { z-index: 13; }
|
||||
.f3 .tab { margin-left: calc(var(--tab-offset) * 3); bottom: calc(100% + var(--stack-step) * 3); background: #d4b8c4; color: #2a1820; }
|
||||
.f3 { top: calc(var(--stack-stick) + var(--stack-step) * 3); z-index: 13; }
|
||||
.f3 .tab { top: calc(var(--stack-stick) + var(--stack-step) * 3); margin-left: calc(var(--tab-offset) * 3); background: #d4b8c4; color: #2a1820; }
|
||||
|
||||
.f4 { z-index: 14; }
|
||||
.f4 .tab { margin-left: calc(var(--tab-offset) * 4); bottom: calc(100% + var(--stack-step) * 4); background: #d4c8a8; color: #2a2418; }
|
||||
.f4 { top: calc(var(--stack-stick) + var(--stack-step) * 4); z-index: 14; }
|
||||
.f4 .tab { top: calc(var(--stack-stick) + var(--stack-step) * 4); margin-left: calc(var(--tab-offset) * 4); background: #d4c8a8; color: #2a2418; }
|
||||
|
||||
.f5 { z-index: 15; }
|
||||
.f5 .tab { margin-left: calc(var(--tab-offset) * 5); bottom: calc(100% + var(--stack-step) * 5); background: #c4c4c4; color: #2a2a2a; }
|
||||
.f5 { top: calc(var(--stack-stick) + var(--stack-step) * 5); z-index: 15; }
|
||||
.f5 .tab { top: calc(var(--stack-stick) + var(--stack-step) * 5); margin-left: calc(var(--tab-offset) * 5); background: #c4c4c4; color: #2a2a2a; }
|
||||
|
||||
.f6 { z-index: 16; }
|
||||
.f6 .tab { margin-left: calc(var(--tab-offset) * 6); bottom: calc(100% + var(--stack-step) * 6); background: #2a4a6b; color: #e8e2d4; }
|
||||
.f6 { top: calc(var(--stack-stick) + var(--stack-step) * 6); z-index: 16; }
|
||||
.f6 .tab { top: calc(var(--stack-stick) + var(--stack-step) * 6); margin-left: calc(var(--tab-offset) * 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