Skip to content

Commit

Permalink
I hate this (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Mar 27, 2024
1 parent fa0f88d commit 47e50f3
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/sunpy_sphinx_theme/theme/sunpy/static/sunpy_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,25 @@ html[data-theme="light"] .bd-sidebar-primary .theme-switch-button span {
}

/* Sidebar */
/* Left hand sidebar */
.bd-sidebar-primary {
background-color: var(--sst-sidebar-background-color);
max-height: calc(100vh - var(--pst-header-height));
flex-basis: 22%;
border-right-width: 3px;
border-right-color: var(--sst-accent-color-bright);
top: var(--pst-header-height);
}

/* Both left and right sidebars */
.bd-sidebar-primary,
.bd-sidebar-secondary {
/* Reduce the top padding */
padding-top: 1rem;
/* Because we have a fixed header, we make the sidebar(s) a dynamic height with a */
/* fixed top and bottom. */
height: auto;
top: var(--pst-header-height);
bottom: 0;
}

.bd-sidebar a.navbar-brand {
Expand All @@ -276,6 +284,11 @@ img.logo__image {
height: var(--pst-header-height);
}

.bd-sidebar-primary .sidebar-primary-items__end {
/* Disable the bottom margin in the end sidebar Section */
margin-bottom: 0;
}

/* RTD Flyout tweaks */
.bd-sidebar-primary div#rtd-footer-container .rst-other-versions input {
color: var(--pst-color-primary);
Expand All @@ -292,12 +305,6 @@ img.logo__image {
border-top-color: var(--pst-color-border);
}

/* Bizzarely having a minimum height here fixes the permanent appearance of the */
/* sidebar scrollbar */
#rtd-footer-container {
min-height: 1rem;
}

/* Revert the flyout footer to the RTD font size */
.rst-versions small {
font-size: 90%;
Expand Down

0 comments on commit 47e50f3

Please sign in to comment.