Skip to content

Commit

Permalink
Horizontally centre the sidebar collapse button (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 authored Feb 3, 2025
1 parent 01d5bcf commit 2f15ba6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions python_docs_theme/static/pydoctheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ div.sphinxsidebar input[type='text'] {
}

#sidebarbutton {
display: flex;
justify-content: center;
align-items: center;
/* Sphinx 4.x and earlier compat */
height: 100%;
background-color: #CCCCCC;
Expand All @@ -200,19 +203,12 @@ div.sphinxsidebar input[type='text'] {
cursor: pointer;
padding-top: 1px;
float: right;
display: table;
/* after Sphinx 4.x and earlier is dropped, only the below is needed */
width: 12px;
border-radius: 0 5px 5px 0;
border-left: none;
}

#sidebarbutton span {
/* Sphinx 4.x and earlier compat */
display: table-cell;
vertical-align: middle;
}

#sidebarbutton:hover {
background-color: #AAAAAA;
}
Expand Down

0 comments on commit 2f15ba6

Please sign in to comment.