Hide the scroll bar of code block when not hovering (resolve #414)
This commit is contained in:
parent
9e9278ce30
commit
e5df04dd59
1 changed files with 19 additions and 0 deletions
|
@ -66,6 +66,25 @@ $scrollbar-size: 7px;
|
|||
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 --- */
|
||||
|
||||
h1 {
|
||||
|
|
Loading…
Reference in a new issue