From da8db69422bdbbc39f871b3ad79c60bad5800756 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Sat, 11 May 2024 21:12:22 +0800 Subject: [PATCH] Specify transition-property --- source/css/_common/components/back-to-top.styl | 4 +++- source/css/_common/components/post/post-reward.styl | 1 - source/css/_common/outline/sidebar/index.styl | 3 ++- source/css/_common/scaffolding/toggles.styl | 3 ++- source/css/_schemes/Pisces/_sidebar.styl | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/css/_common/components/back-to-top.styl b/source/css/_common/components/back-to-top.styl index 8fa649e..3755a0e 100644 --- a/source/css/_common/components/back-to-top.styl +++ b/source/css/_common/components/back-to-top.styl @@ -34,7 +34,9 @@ if (hexo-config('back2top.enable')) { color: $b2t-color; display: flex; height: $sidebar-toggle-size; - transition: bottom $transition-ease; + transition: $transition-ease; + // Override in Pisces + transition-property: bottom; sidebar-toggle(); &:hover { diff --git a/source/css/_common/components/post/post-reward.styl b/source/css/_common/components/post/post-reward.styl index 6f1531f..17f1f1c 100644 --- a/source/css/_common/components/post/post-reward.styl +++ b/source/css/_common/components/post/post-reward.styl @@ -8,7 +8,6 @@ border: 2px solid $sidebar-highlight; border-radius: 2px; outline: 0; - transition: all $transition-ease; vertical-align: text-top; } } diff --git a/source/css/_common/outline/sidebar/index.styl b/source/css/_common/outline/sidebar/index.styl index 682cee4..9043b38 100644 --- a/source/css/_common/outline/sidebar/index.styl +++ b/source/css/_common/outline/sidebar/index.styl @@ -27,7 +27,8 @@ overflow-y: auto; position: fixed; top: 0; - transition: all $transition-ease-out; + transition: $transition-ease-out; + transition-property: left, right; width: $sidebar-width-expanded; z-index: $zindex-2; diff --git a/source/css/_common/scaffolding/toggles.styl b/source/css/_common/scaffolding/toggles.styl index 96fe460..4819ec6 100644 --- a/source/css/_common/scaffolding/toggles.styl +++ b/source/css/_common/scaffolding/toggles.styl @@ -8,7 +8,8 @@ left: 0; position: relative; top: 0; - transition: all .4s; + transition: .4s; + transition-property: left, opacity, top, transform, width; width: 100%; &:first-child { diff --git a/source/css/_schemes/Pisces/_sidebar.styl b/source/css/_schemes/Pisces/_sidebar.styl index 3a43a4c..5299d97 100644 --- a/source/css/_schemes/Pisces/_sidebar.styl +++ b/source/css/_schemes/Pisces/_sidebar.styl @@ -85,6 +85,7 @@ .back-to-top { background: var(--body-bg-color); margin: 8px - $sidebar-offset -10px -18px; + transition-property: bottom, margin-top; &.back-to-top-on { margin-top: 16px;