Skip to content

Commit

Permalink
[docs] Keep top-bar visible (#12464)
Browse files Browse the repository at this point in the history
This commit ensures the top-bar is always visible, rather than being hidden on scrolling or navigating to a target.
  • Loading branch information
chrisjsewell committed Jun 22, 2024
1 parent be92d65 commit 5311913
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions doc/_themes/sphinx13/static/sphinx13.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ body {
}

.pageheader {
position: sticky;
top: 0;
z-index: 99;
height: 3rem;
display: flex;
column-gap: 1em;
align-items: center;
Expand Down Expand Up @@ -80,6 +84,9 @@ div.body {
}

div.related {
position: sticky;
top: 3rem;
z-index: 99;
display: flex;
color: white;
background-color: var(--colour-sphinx-blue);
Expand Down Expand Up @@ -107,16 +114,15 @@ div.sphinxsidebarwrapper {

div.sphinxsidebar {
position: sticky;
top: 0;
top: 4.6rem;
align-self: flex-start;
height: 100vh;
height: calc(100vh - 4.6rem);
width: 250px;
min-width: 150px;
overflow-y: auto;
overflow-wrap: break-word;
margin: 0;
padding-right: 15px;
padding-top: 0.5em;
padding: 0.5em 15px 0.5em 10px;
font-size: 1em;
}

Expand Down Expand Up @@ -207,6 +213,11 @@ div.footer a {

/* -- body styles ----------------------------------------------------------- */

.body :target {
/* ensure targets are not obscured by top-bar when they are navigated to */
scroll-margin-top: 6.5rem;
}

p {
margin: 0.8em 0 0.5em 0;
}
Expand Down

0 comments on commit 5311913

Please sign in to comment.