From 387fc671026e5c5929e6b577be96650bf99bb81c Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 23 Sep 2021 18:58:18 +0800 Subject: [PATCH] Improve the vertical alignment of icons - sidebar bottom icons - back to top icon --- _sass/addon/commons.scss | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 1bc8a0b..bbe0193 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -806,6 +806,11 @@ $sidebar-display: "sidebar-display"; vertical-align: middle; } + i { + line-height: 1.75rem; // default line-height in body + vertical-align: middle; + } + #mode-toggle-wrapper { @extend %icon; @@ -1081,18 +1086,27 @@ $sidebar-display: "sidebar-display"; /* --- button back-to-top --- */ #back-to-top { + $size: 2.7em; + display: none; z-index: 1; cursor: pointer; position: fixed; background: var(--button-bg); color: var(--btn-backtotop-color); - height: 2.6em; - width: 2.7em; + padding: 0; + width: $size; + height: $size; border-radius: 50%; border: 1px solid var(--btn-backtotop-border-color); transition: 0.2s ease-out; -webkit-transition: 0.2s ease-out; + + i { + line-height: $size; + position: relative; + bottom: 2px; + } } #back-to-top:hover {