Skip to content

Commit

Permalink
rustdoc: fix the search-bar layout
Browse files Browse the repository at this point in the history
Now with broader compatibility.
  • Loading branch information
adrientetar committed Dec 7, 2013
1 parent 67aca9c commit 89e1fb3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/librustdoc/html/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
<nav class=\"sub\">
<form class=\"search-form js-only\">
<input class=\"search-input\" name=\"search\"
autocomplete=\"off\"
placeholder=\"Search documentation...\"
type=\"search\" />
<button class=\"do-search\">Search</button>
<div class=\"search-container\">
<input class=\"search-input\" name=\"search\"
autocomplete=\"off\"
placeholder=\"Search documentation...\"
type=\"search\" />
</div>
</form>
</nav>
Expand Down
6 changes: 5 additions & 1 deletion src/librustdoc/html/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,14 @@ a {
.content a.fn, .block a.current.fn { color: #8c6067; }
.content .fnname { color: #8c6067; }

.search-container {
padding-right: 10px;
overflow: hidden;
}
.search-input {
border: 2px solid #e9e9e9;
border-radius: 2px;
width: calc(100% - 66px);
width: 100%;
}
.do-search {
float: right;
Expand Down

0 comments on commit 89e1fb3

Please sign in to comment.