Skip to content

Commit

Permalink
fix(ui): slow script loading hides TOC fade-up effect in desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Dec 15, 2024
1 parent 2f00d41 commit 1ec361f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions _sass/pages/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,11 @@ header {
@-webkit-keyframes fade-up {
from {
opacity: 0;
position: relative;
top: 2rem;
margin-top: 4rem;
}

to {
opacity: 1;
position: relative;
top: 0;
}
}

Expand All @@ -247,6 +244,7 @@ header {
%top-cover {
content: '';
display: block;
position: -webkit-sticky;
position: sticky;
top: 0;
width: 100%;
Expand All @@ -257,13 +255,16 @@ header {
#toc-wrapper {
top: 0;
transition: top 0.2s ease-in-out;
-webkit-animation: fade-up 0.8s;
animation: fade-up 0.8s;
overflow-y: auto;
max-height: 100vh;
scrollbar-width: none;
margin-top: 2rem;

&:not(.invisible) {
-webkit-animation: fade-up 0.8s;
animation: fade-up 0.8s;
}

ul {
list-style: none;
font-size: 0.85rem;
Expand Down

0 comments on commit 1ec361f

Please sign in to comment.