Specify transition-property

This commit is contained in:
Mimi 2024-05-11 21:12:22 +08:00
parent 17259c0018
commit da8db69422
5 changed files with 8 additions and 4 deletions

View File

@ -34,7 +34,9 @@ if (hexo-config('back2top.enable')) {
color: $b2t-color; color: $b2t-color;
display: flex; display: flex;
height: $sidebar-toggle-size; height: $sidebar-toggle-size;
transition: bottom $transition-ease; transition: $transition-ease;
// Override in Pisces
transition-property: bottom;
sidebar-toggle(); sidebar-toggle();
&:hover { &:hover {

View File

@ -8,7 +8,6 @@
border: 2px solid $sidebar-highlight; border: 2px solid $sidebar-highlight;
border-radius: 2px; border-radius: 2px;
outline: 0; outline: 0;
transition: all $transition-ease;
vertical-align: text-top; vertical-align: text-top;
} }
} }

View File

@ -27,7 +27,8 @@
overflow-y: auto; overflow-y: auto;
position: fixed; position: fixed;
top: 0; top: 0;
transition: all $transition-ease-out; transition: $transition-ease-out;
transition-property: left, right;
width: $sidebar-width-expanded; width: $sidebar-width-expanded;
z-index: $zindex-2; z-index: $zindex-2;

View File

@ -8,7 +8,8 @@
left: 0; left: 0;
position: relative; position: relative;
top: 0; top: 0;
transition: all .4s; transition: .4s;
transition-property: left, opacity, top, transform, width;
width: 100%; width: 100%;
&:first-child { &:first-child {

View File

@ -85,6 +85,7 @@
.back-to-top { .back-to-top {
background: var(--body-bg-color); background: var(--body-bg-color);
margin: 8px - $sidebar-offset -10px -18px; margin: 8px - $sidebar-offset -10px -18px;
transition-property: bottom, margin-top;
&.back-to-top-on { &.back-to-top-on {
margin-top: 16px; margin-top: 16px;