Skip to content

Commit 2f15ba6

Browse files
authored
Horizontally centre the sidebar collapse button (#219)
1 parent 01d5bcf commit 2f15ba6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

python_docs_theme/static/pydoctheme.css

+3-7
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ div.sphinxsidebar input[type='text'] {
191191
}
192192

193193
#sidebarbutton {
194+
display: flex;
195+
justify-content: center;
196+
align-items: center;
194197
/* Sphinx 4.x and earlier compat */
195198
height: 100%;
196199
background-color: #CCCCCC;
@@ -200,19 +203,12 @@ div.sphinxsidebar input[type='text'] {
200203
cursor: pointer;
201204
padding-top: 1px;
202205
float: right;
203-
display: table;
204206
/* after Sphinx 4.x and earlier is dropped, only the below is needed */
205207
width: 12px;
206208
border-radius: 0 5px 5px 0;
207209
border-left: none;
208210
}
209211

210-
#sidebarbutton span {
211-
/* Sphinx 4.x and earlier compat */
212-
display: table-cell;
213-
vertical-align: middle;
214-
}
215-
216212
#sidebarbutton:hover {
217213
background-color: #AAAAAA;
218214
}

0 commit comments

Comments
 (0)