Skip to content

Commit a818c03

Browse files
Tiny tweak for search box wrapping under the separation line when screen size is reduced
Fixes python#7.
1 parent 2e8da49 commit a818c03

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

python_docs_theme/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
{%- macro searchbox() %}
1414
{# modified from sphinx/themes/basic/searchbox.html #}
1515
{%- if builder != "htmlhelp" %}
16+
<div class="flex-container">
1617
<div class="inline-search" style="display: none" role="search">
1718
<form class="inline-search" action="{{ pathto('search') }}" method="get">
1819
<input placeholder="{{ _('Quick search') }}" type="text" name="q" />
@@ -21,6 +22,7 @@
2122
<input type="hidden" name="area" value="default" />
2223
</form>
2324
</div>
25+
</div>
2426
<script type="text/javascript">$('.inline-search').show(0);</script>
2527
{%- endif %}
2628
{%- endmacro %}

python_docs_theme/static/pydoctheme.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ div.related:first-child {
2222
border-bottom: 1px solid #ccc;
2323
}
2424

25+
.flex.container {
26+
display: flex;
27+
}
28+
29+
.fill-width {
30+
flex: 1;
31+
}
32+
2533
.inline-search {
2634
display: inline;
2735
}

0 commit comments

Comments
 (0)