Skip to content

Commit 83ed897

Browse files
committed
Transition sticky header in and out
1 parent 8362a18 commit 83ed897

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

assets/base.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,20 @@ pre {
377377

378378
.sticky-header-hidden,
379379
.sticky-header-stuck {
380+
position: sticky;
381+
top: 0;
382+
z-index: 10;
383+
will-change: transform;
380384
transition: all var(--duration-medium) ease-out;
381385
}
382386

383387
.sticky-header-hidden {
384388
transform: translateY(-100%);
389+
box-shadow: none;
385390
}
386391

387392
.sticky-header-stuck {
388393
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
389-
position: sticky;
390394
transform: translateY(0);
391395
}
392396

0 commit comments

Comments
 (0)