Skip to content

Commit

Permalink
🐛 BUG: fixing sidebar overlap on narrow screens
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Aug 8, 2020
1 parent 6439b66 commit ee3b945
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx_book_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- Docs TOC is "d-none d-xl-block col-xl-2" -->

{% block docs_sidebar %}
<div class="col-12 {{ sidebar_width_class }} bd-sidebar site-navigation show" id="site-navigation">
<div class="col-12 {{ sidebar_width_class }} bd-sidebar site-navigation show{% if is_single_page %} single-page{% endif %}" id="site-navigation">
{% if not is_single_page %}
{% include "sidebar.html" %}
{%- endif %}
Expand Down
5 changes: 5 additions & 0 deletions sphinx_book_theme/static/sphinx-book-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,11 @@ button.topbarbtn img {
&.collapsing {
height: 0px !important;
}

// If we're only a single page, sidebar should hide at narrow widths.
&.single-page {
display: none;
}
}
}

Expand Down

0 comments on commit ee3b945

Please sign in to comment.