Hide the scroll bar of code block when not hovering (resolve #414)

This commit is contained in:
Cotes Chung 2021-09-28 16:10:25 +08:00
parent 9e9278ce30
commit e5df04dd59
1 changed files with 19 additions and 0 deletions

View File

@ -66,6 +66,25 @@ $scrollbar-size: 7px;
border-radius: calc(#{$scrollbar-size} / 2); border-radius: calc(#{$scrollbar-size} / 2);
} }
.highlight {
border-color: transparent;
transition: border-color 0.5s ease;
&:hover {
border-color: var(--scrollbar-thumb-bg);
transition: border-color 0.2s ease;
}
&::-webkit-scrollbar-thumb {
/* add border to act as background-color */
border-right-style: inset;
border-right-width: calc(100vw + 100vh);
border-color: inherit;
background-color: var(--highlight-bg-color);
}
}
/* --- Typography --- */ /* --- Typography --- */
h1 { h1 {