ntno / mkdocs-terminal

monospace theme for MkDocs
https://ntno.github.io/mkdocs-terminal/
MIT License
96 stars 3 forks source link

DRAFT: Sticky Side Panel CSS Override #152

Open ntno opened 3 weeks ago

ntno commented 3 weeks ago

possible solution for #140 can be implemented without a change to the theme. use the "Extra CSS" mkdocs.yml block:

mkdocs.yml

extra_css:
  - overrides/extra.css

docs/overrides/extra.css


/* sticky side panel - https://github.com/ntno/mkdocs-terminal/issues/140 */

#terminal-mkdocs-side-panel {
    top: calc(var(--global-space) * 2);
    position: sticky;
    overflow-y: scroll;
    max-height: 90vh;
}

/* Hide scrollbar for Chrome, Safari and Opera */

#terminal-mkdocs-side-panel::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */

#terminal-mkdocs-side-panel {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}