Merge pull request #9944 from realandersn/andersn/fix-techdocs-sidebar-scroll

[Techdocs] fix sidebar scroll
This commit is contained in:
Eric Peterson
2022-03-14 14:40:44 +01:00
committed by GitHub
3 changed files with 40 additions and 2 deletions
@@ -442,16 +442,42 @@ export const useTechDocsReaderDom = (
}
.md-sidebar {
height: calc(100% - 100px);
bottom: 75px;
position: fixed;
width: 16rem;
overflow-y: auto;
overflow-x: hidden;
scrollbar-color: rgb(193, 193, 193) #eee;
scrollbar-width: thin;
}
.md-sidebar .md-sidebar__scrollwrap {
max-height: calc(100% - 100px);
width: calc(16rem - 10px);
}
.md-sidebar--secondary {
right: ${theme.spacing(3)}px;
}
.md-sidebar::-webkit-scrollbar {
width: 5px;
}
.md-sidebar::-webkit-scrollbar-button {
width: 5px;
height: 5px;
}
.md-sidebar::-webkit-scrollbar-track {
background: #eee;
border: 1 px solid rgb(250, 250, 250);
box-shadow: 0px 0px 3px #dfdfdf inset;
border-radius: 3px;
}
.md-sidebar::-webkit-scrollbar-thumb {
width: 5px;
background: rgb(193, 193, 193);
border: transparent;
border-radius: 3px;
}
.md-sidebar::-webkit-scrollbar-thumb:hover {
background: rgb(125, 125, 125);
}
.md-content {
max-width: calc(100% - 16rem * 2);
@@ -474,6 +500,12 @@ export const useTechDocsReaderDom = (
background-color: unset;
}
@media screen and (min-width: 76.25em) {
.md-sidebar {
height: auto;
}
}
@media screen and (max-width: 76.1875em) {
.md-nav {
transition: none !important;