Skip to content

Commit

Permalink
Optimize sidebar-dimmer & search-popup animation
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Jun 20, 2020
1 parent b2ae986 commit 8a5643b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
6 changes: 1 addition & 5 deletions source/css/_common/components/post/post-collapse.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
border-radius: 50%;
content: ' ';
height: 10px;
left: 0;
margin-left: -6px;
margin-top: -4px;
position: absolute;
Expand All @@ -37,7 +36,6 @@
border-radius: 50%;
content: ' ';
height: 8px;
left: 0;
margin-left: -4px;
margin-top: -4px;
position: absolute;
Expand Down Expand Up @@ -69,8 +67,7 @@
border-radius: 50%;
content: ' ';
height: 6px;
left: 0;
margin-left: -4px;
left: -4px;
position: absolute;
top: $font-size-smallest;
transition: background $transition-ease;
Expand Down Expand Up @@ -110,7 +107,6 @@
background: $whitesmoke;
content: ' ';
height: 100%;
left: 0;
margin-left: -2px;
position: absolute;
top: 1.25em;
Expand Down
3 changes: 0 additions & 3 deletions source/css/_common/components/post/post-header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,14 @@
bottom: 0;
content: '';
height: 2px;
left: 0;
position: absolute;
transform: scaleX(0);
transition: transform $transition-ease;
visibility: hidden;
width: 100%;
}

&:hover::before {
transform: scaleX(1);
visibility: visible;
}

.fa-external-link-alt {
Expand Down
5 changes: 2 additions & 3 deletions source/css/_common/components/third-party/search.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
left: 0;
position: fixed;
top: 0;
transition: visibility 0s linear .2s, background .2s;
transition: visibility .4s, background .4s;
visibility: hidden;
width: 100%;
z-index: $zindex-4;

.search-active & {
background: rgba(0, 0, 0, .3);
transition: background .2s;
visibility: visible;
}
}
Expand All @@ -27,7 +26,7 @@
height: 80%;
margin: auto;
transform: scale(0);
transition: transform .2s;
transition: transform .4s;
width: 700px;

.search-active & {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/outline/footer/footer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
main-container();
}

@keyframes iconAnimate {
@keyframes icon-animate {
0%, 100% {
transform: scale(1);
}
Expand Down Expand Up @@ -62,7 +62,7 @@
margin: 0 5px;

if (hexo-config('footer.icon.animated')) {
animation: iconAnimate 1.33s ease-in-out infinite;
animation: icon-animate 1.33s ease-in-out infinite;
}
}

Expand Down
7 changes: 4 additions & 3 deletions source/css/_common/outline/sidebar/sidebar-dimmer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
background: black;
display: block;
height: 100%;
left: 100%;
left: 0;
opacity: 0;
position: fixed;
top: 0;
transition: visibility .4s, opacity .4s;
visibility: hidden;
width: 100%;
z-index: $zindex-1;

.sidebar-active & {
opacity: .7;
transform: translateX(-100%);
transition: opacity .5s;
visibility: visible;
}
}
}

0 comments on commit 8a5643b

Please sign in to comment.