From d905a28d6afef60f57ca9433343a58f4b330e9c6 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Wed, 17 Jun 2020 20:41:19 +0800 Subject: [PATCH] Remove the-transition --- .../components/back-to-top-sidebar.styl | 1 + source/css/_common/components/back-to-top.styl | 2 +- source/css/_common/components/components.styl | 1 - .../_common/components/post/post-collapse.styl | 6 ++---- .../_common/components/post/post-header.styl | 4 ++-- .../_common/components/post/post-reward.styl | 2 +- .../_common/components/third-party/search.styl | 1 - .../css/_common/outline/header/bookmark.styl | 3 +-- source/css/_common/outline/header/menu.styl | 3 +-- .../outline/sidebar/sidebar-author-links.styl | 2 +- .../_common/outline/sidebar/sidebar-toc.styl | 3 +-- source/css/_common/scaffolding/base.styl | 2 +- source/css/_common/scaffolding/buttons.styl | 3 +-- .../scaffolding/highlight/copy-code.styl | 2 +- source/css/_common/scaffolding/pagination.styl | 3 +-- source/css/_common/scaffolding/tags/tabs.styl | 4 ++-- source/css/_mixins.styl | 18 ------------------ source/css/_schemes/Muse/_sidebar.styl | 2 +- source/css/_variables/base.styl | 10 ++++++++-- 19 files changed, 26 insertions(+), 46 deletions(-) diff --git a/source/css/_common/components/back-to-top-sidebar.styl b/source/css/_common/components/back-to-top-sidebar.styl index 4077ad9..a1ba94b 100644 --- a/source/css/_common/components/back-to-top-sidebar.styl +++ b/source/css/_common/components/back-to-top-sidebar.styl @@ -2,6 +2,7 @@ background: transparent; margin: 20px - $sidebar-offset -10px -20px; opacity: 0; + transition: opacity $transition-ease; if (!hexo-config('back2top.scrollpercent')) { span { diff --git a/source/css/_common/components/back-to-top.styl b/source/css/_common/components/back-to-top.styl index 2c78424..e54bd33 100644 --- a/source/css/_common/components/back-to-top.styl +++ b/source/css/_common/components/back-to-top.styl @@ -8,7 +8,7 @@ opacity: $b2t-opacity; padding: 0 6px; position: fixed; - transition-property: bottom; + transition: bottom $transition-ease; z-index: $zindex-3; if (hexo-config('back2top.scrollpercent')) { diff --git a/source/css/_common/components/components.styl b/source/css/_common/components/components.styl index 8b0e079..0a9a06d 100644 --- a/source/css/_common/components/components.styl +++ b/source/css/_common/components/components.styl @@ -1,7 +1,6 @@ if (hexo-config('back2top.enable')) { .back-to-top { font-size: $b2t-font-size; - the-transition(); } @import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top'); diff --git a/source/css/_common/components/post/post-collapse.styl b/source/css/_common/components/post/post-collapse.styl index c02aab2..f0f79bb 100644 --- a/source/css/_common/components/post/post-collapse.styl +++ b/source/css/_common/components/post/post-collapse.styl @@ -61,8 +61,7 @@ margin: 30px 0; padding-left: 15px; position: relative; - transition-property: border; - the-transition(); + transition: border $transition-ease; &::before { background: $grey; @@ -74,9 +73,8 @@ margin-left: -4px; position: absolute; top: $font-size-smallest; - transition-property: background; + transition: background $transition-ease; width: 6px; - the-transition(); } &:hover { diff --git a/source/css/_common/components/post/post-header.styl b/source/css/_common/components/post/post-header.styl index bf19019..97857d5 100644 --- a/source/css/_common/components/post/post-header.styl +++ b/source/css/_common/components/post/post-header.styl @@ -17,7 +17,7 @@ float: right; font-size: $font-size-larger; margin-left: -1.2em; - the-transition-ease-in(); + transition: color $transition-ease-in; +mobile-small() { margin-left: initial; @@ -45,9 +45,9 @@ left: 0; position: absolute; transform: scaleX(0); + transition: transform $transition-ease; visibility: hidden; width: 100%; - the-transition(); } &:hover::before { diff --git a/source/css/_common/components/post/post-reward.styl b/source/css/_common/components/post/post-reward.styl index 925831d..9a3d7c9 100644 --- a/source/css/_common/components/post/post-reward.styl +++ b/source/css/_common/components/post/post-reward.styl @@ -13,8 +13,8 @@ line-height: 2; outline: 0; padding: 0 15px; + transition: all $transition-ease; vertical-align: text-top; - the-transition(); &:hover { background: $sidebar-highlight; diff --git a/source/css/_common/components/third-party/search.styl b/source/css/_common/components/third-party/search.styl index 76f03a3..2230e34 100644 --- a/source/css/_common/components/third-party/search.styl +++ b/source/css/_common/components/third-party/search.styl @@ -111,7 +111,6 @@ if (hexo-config('algolia_search.enable')) { .algolia-hit-item-link { border-bottom: 1px dashed $grey-light; display: block; - the-transition(); } .algolia-pagination { diff --git a/source/css/_common/outline/header/bookmark.styl b/source/css/_common/outline/header/bookmark.styl index 8bf36bf..b391f45 100644 --- a/source/css/_common/outline/header/bookmark.styl +++ b/source/css/_common/outline/header/bookmark.styl @@ -1,10 +1,9 @@ .book-mark-link { border-bottom: none; - display: inline-block; position: fixed; right: $b2t-position-right; top: -10px; - transition: .3s; + transition: top .3s; +tablet-mobile() { display: none; diff --git a/source/css/_common/outline/header/menu.styl b/source/css/_common/outline/header/menu.styl index 66d80a3..db2aa51 100644 --- a/source/css/_common/outline/header/menu.styl +++ b/source/css/_common/outline/header/menu.styl @@ -24,8 +24,7 @@ border-bottom: 0; display: block; font-size: $font-size-smaller; - transition-property: border-color; - the-transition(); + transition: border-color $transition-ease; &:hover, &.menu-item-active { background: var(--menu-item-bg-color); diff --git a/source/css/_common/outline/sidebar/sidebar-author-links.styl b/source/css/_common/outline/sidebar/sidebar-author-links.styl index b72c548..f15f4da 100644 --- a/source/css/_common/outline/sidebar/sidebar-author-links.styl +++ b/source/css/_common/outline/sidebar/sidebar-author-links.styl @@ -10,7 +10,7 @@ vertical-align: middle; if (hexo-config('social_icons.transition')) { - the-transition(); + transition: all $transition-ease; } &::before { diff --git a/source/css/_common/outline/sidebar/sidebar-toc.styl b/source/css/_common/outline/sidebar/sidebar-toc.styl index 739ec6f..8b6a72d 100644 --- a/source/css/_common/outline/sidebar/sidebar-toc.styl +++ b/source/css/_common/outline/sidebar/sidebar-toc.styl @@ -12,8 +12,7 @@ } a { - transition-property: all; - the-transition(); + transition: all $transition-ease; } } diff --git a/source/css/_common/scaffolding/base.styl b/source/css/_common/scaffolding/base.styl index 8c327e5..f5b4657 100644 --- a/source/css/_common/scaffolding/base.styl +++ b/source/css/_common/scaffolding/base.styl @@ -13,7 +13,7 @@ body { font-family: $font-family-base; font-size: $font-size-base; line-height: $line-height-base; - the-transition(); + transition: all $transition-ease; } h1, h2, h3, h4, h5, h6 { diff --git a/source/css/_common/scaffolding/buttons.styl b/source/css/_common/scaffolding/buttons.styl index 6c0145d..cd012cc 100644 --- a/source/css/_common/scaffolding/buttons.styl +++ b/source/css/_common/scaffolding/buttons.styl @@ -8,8 +8,7 @@ line-height: 2; padding: 0 20px; text-decoration: none; - transition-property: background-color; - the-transition(); + transition: background-color $transition-ease; &:hover { background: var(--btn-default-hover-bg); diff --git a/source/css/_common/scaffolding/highlight/copy-code.styl b/source/css/_common/scaffolding/highlight/copy-code.styl index 60ee7f1..0088132 100644 --- a/source/css/_common/scaffolding/highlight/copy-code.styl +++ b/source/css/_common/scaffolding/highlight/copy-code.styl @@ -9,7 +9,7 @@ opacity: 0; padding: 2px 6px; position: absolute; - the-transition(); + transition: opacity $transition-ease; if (hexo-config('codeblock.copy_button.style') == 'flat') { background: white; diff --git a/source/css/_common/scaffolding/pagination.styl b/source/css/_common/scaffolding/pagination.styl index f09a9cb..623124b 100644 --- a/source/css/_common/scaffolding/pagination.styl +++ b/source/css/_common/scaffolding/pagination.styl @@ -17,8 +17,7 @@ $page-number-basic { @extend $page-number-basic; border-bottom: 0; border-top: 1px solid $pagination-link-border; - transition-property: border-color; - the-transition(); + transition: border-color $transition-ease; &:hover { border-top-color: $pagination-link-hover-border; diff --git a/source/css/_common/scaffolding/tags/tabs.styl b/source/css/_common/scaffolding/tags/tabs.styl index d2c4b42..fa911c8 100644 --- a/source/css/_common/scaffolding/tags/tabs.styl +++ b/source/css/_common/scaffolding/tags/tabs.styl @@ -39,7 +39,7 @@ } if (hexo-config('tabs.transition.tabs')) { - the-transition-ease-out(); + transition: all $transition-ease-out; } a { @@ -55,7 +55,7 @@ } if (hexo-config('tabs.transition.labels')) { - the-transition-ease-out(); + transition: all $transition-ease-out; } } diff --git a/source/css/_mixins.styl b/source/css/_mixins.styl index 38ec91d..ce08536 100644 --- a/source/css/_mixins.styl +++ b/source/css/_mixins.styl @@ -1,21 +1,3 @@ -the-transition() { - transition-delay: 0s; - transition-duration: .2s; - transition-timing-function: ease-in-out; -} - -the-transition-ease-in() { - transition-delay: 0s; - transition-duration: .2s; - transition-timing-function: ease-in; -} - -the-transition-ease-out() { - transition-delay: 0s; - transition-duration: .2s; - transition-timing-function: ease-out; -} - mobile-smallest() { @media (max-width: 413px) { {block}; diff --git a/source/css/_schemes/Muse/_sidebar.styl b/source/css/_schemes/Muse/_sidebar.styl index 54b535e..47ffec3 100644 --- a/source/css/_schemes/Muse/_sidebar.styl +++ b/source/css/_schemes/Muse/_sidebar.styl @@ -44,7 +44,7 @@ if (hexo-config('sidebar.position') == 'right') { .sidebar { width: $sidebar-desktop; z-index: $zindex-2; - the-transition-ease-out(); + transition: all $transition-ease-out; a, span.exturl { border-bottom-color: $black-light; diff --git a/source/css/_variables/base.styl b/source/css/_variables/base.styl index 71f9c1b..6b8086e 100644 --- a/source/css/_variables/base.styl +++ b/source/css/_variables/base.styl @@ -3,8 +3,7 @@ // ================================================== -// Colors -// colors for use across theme. +// Color system // -------------------------------------------------- $whitesmoke = #f5f5f5; $gainsboro = #eee; @@ -23,6 +22,13 @@ $blue-deep = #262a30; $orange = #fc6423; +// Transition +// -------------------------------------------------- +$transition-ease = .2s ease-in-out; +$transition-ease-in = .2s ease-in; +$transition-ease-out = .2s ease-out; + + // Scaffolding // Settings for some of the most global styles. // --------------------------------------------------