Skip to content

Commit 25a7275

Browse files
committed
Use a magnifying glass instead of a text "Go" for the search button
additionally: - Change placeholder text from "Search" to "Search...", which seems more common - CSS changes: Use a fixed height to make sure search field and button have the same hight. Also reduce button width a little because the icon needs less space.
1 parent 1e13565 commit 25a7275

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

sphinx/themes/basic/searchbox.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h3 id="searchlabel">{{ _('Quick search') }}</h3>
1313
<div class="searchformwrapper">
1414
<form class="search" action="{{ pathto('search') }}" method="get">
1515
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
16-
<input type="submit" value="{{ _('Go') }}" />
16+
<input type="submit" value="{{ _('🔍') }}" />
1717
</form>
1818
</div>
1919
</search>

sphinx/themes/basic/searchfield.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<search id="searchbox" style="display: none" role="search">
1515
<div class="searchformwrapper">
1616
<form class="search" action="{{ pathto('search') }}" method="get">
17-
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
18-
<input type="submit" value="{{ _('Go') }}" />
17+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search..."/>
18+
<input type="submit" value="{{ _('🔍︎') }}" />
1919
</form>
2020
</div>
2121
</search>

sphinx/themes/basic/static/basic.css.jinja

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,17 @@ div.sphinxsidebar #searchbox form.search {
9393

9494
div.sphinxsidebar #searchbox input[type="text"] {
9595
float: left;
96-
width: 80%;
97-
padding: 0.25em;
96+
width: 84%;
97+
height: 2em;
98+
padding-left: 0.4em;
9899
box-sizing: border-box;
99100
}
100101

101102
div.sphinxsidebar #searchbox input[type="submit"] {
102103
float: left;
103-
width: 20%;
104+
width: 16%;
105+
height: 2em;
104106
border-left: none;
105-
padding: 0.25em;
106107
box-sizing: border-box;
107108
}
108109

0 commit comments

Comments
 (0)