Improve the vertical alignment of icons

- sidebar bottom icons
- back to top icon
This commit is contained in:
Cotes Chung 2021-09-23 18:58:18 +08:00
parent 414715fc47
commit 387fc67102

View file

@ -806,6 +806,11 @@ $sidebar-display: "sidebar-display";
vertical-align: middle; vertical-align: middle;
} }
i {
line-height: 1.75rem; // default line-height in body
vertical-align: middle;
}
#mode-toggle-wrapper { #mode-toggle-wrapper {
@extend %icon; @extend %icon;
@ -1081,18 +1086,27 @@ $sidebar-display: "sidebar-display";
/* --- button back-to-top --- */ /* --- button back-to-top --- */
#back-to-top { #back-to-top {
$size: 2.7em;
display: none; display: none;
z-index: 1; z-index: 1;
cursor: pointer; cursor: pointer;
position: fixed; position: fixed;
background: var(--button-bg); background: var(--button-bg);
color: var(--btn-backtotop-color); color: var(--btn-backtotop-color);
height: 2.6em; padding: 0;
width: 2.7em; width: $size;
height: $size;
border-radius: 50%; border-radius: 50%;
border: 1px solid var(--btn-backtotop-border-color); border: 1px solid var(--btn-backtotop-border-color);
transition: 0.2s ease-out; transition: 0.2s ease-out;
-webkit-transition: 0.2s ease-out; -webkit-transition: 0.2s ease-out;
i {
line-height: $size;
position: relative;
bottom: 2px;
}
} }
#back-to-top:hover { #back-to-top:hover {