Skip to content

Commit

Permalink
BUG: Make article width take up whole page w/o secondary sidebar (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Nov 1, 2023
1 parent dd98df5 commit 1b6e9eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
.bd-main .bd-content .bd-article-container {
// Re-adjust padding defaults to be flush on the top and right
padding: 0rem;

// Unset overflow x so that sticky: top works for the article header
overflow-x: unset;
min-width: 0; // prevent from overflowing the flex container
// prevent from overflowing the flex container
min-width: 0;
// keep article at reasonable width in absence of sidebar
max-width: calc(100% - var(--pst-sidebar-secondary));

.bd-article {
padding-right: 2rem;
padding-left: 2rem;
Expand Down
5 changes: 3 additions & 2 deletions src/sphinx_book_theme/assets/styles/sections/_article.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.bd-main {
flex-grow: 0;
.bd-main .bd-content {
// make article container left aligned in absence of sidebar
justify-content: left;
}

0 comments on commit 1b6e9eb

Please sign in to comment.