[docs] Keep top-bar visible (#12464)

This commit ensures the top-bar is always visible, rather than being hidden on scrolling or navigating to a target.
This commit is contained in:
Chris Sewell
2024-06-23 00:19:43 +02:00
committed by GitHub
parent be92d6545a
commit 53119133f2

View File

@@ -20,6 +20,10 @@ body {
} }
.pageheader { .pageheader {
position: sticky;
top: 0;
z-index: 99;
height: 3rem;
display: flex; display: flex;
column-gap: 1em; column-gap: 1em;
align-items: center; align-items: center;
@@ -80,6 +84,9 @@ div.body {
} }
div.related { div.related {
position: sticky;
top: 3rem;
z-index: 99;
display: flex; display: flex;
color: white; color: white;
background-color: var(--colour-sphinx-blue); background-color: var(--colour-sphinx-blue);
@@ -107,16 +114,15 @@ div.sphinxsidebarwrapper {
div.sphinxsidebar { div.sphinxsidebar {
position: sticky; position: sticky;
top: 0; top: 4.6rem;
align-self: flex-start; align-self: flex-start;
height: 100vh; height: calc(100vh - 4.6rem);
width: 250px; width: 250px;
min-width: 150px; min-width: 150px;
overflow-y: auto; overflow-y: auto;
overflow-wrap: break-word; overflow-wrap: break-word;
margin: 0; margin: 0;
padding-right: 15px; padding: 0.5em 15px 0.5em 10px;
padding-top: 0.5em;
font-size: 1em; font-size: 1em;
} }
@@ -207,6 +213,11 @@ div.footer a {
/* -- body styles ----------------------------------------------------------- */ /* -- body styles ----------------------------------------------------------- */
.body :target {
/* ensure targets are not obscured by top-bar when they are navigated to */
scroll-margin-top: 6.5rem;
}
p { p {
margin: 0.8em 0 0.5em 0; margin: 0.8em 0 0.5em 0;
} }