Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustdoc/html/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ r##"<!DOCTYPE html>
</form>
</nav>

<section id='main' class="content {ty}">{content}</section>
<section id='main'><div class="content {ty}">{content}</div></section>
<section id='search' class="content hidden"></section>

<section class="footer"></section>
Expand Down
8 changes: 4 additions & 4 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@
}

output += "</p>";
$('#main.content').addClass('hidden');
$('#main>div.content').addClass('hidden');
$('#search.content').removeClass('hidden').html(output);
$('#search .desc').width($('#search').width() - 40 -
$('#search td:first-child').first().width());
Expand Down Expand Up @@ -748,7 +748,7 @@
if (browserSupportsHistoryApi()) {
history.replaceState("", "std - Rust", "?search=");
}
$('#main.content').removeClass('hidden');
$('#main>div.content').removeClass('hidden');
$('#search.content').addClass('hidden');
} else {
searchTimeout = setTimeout(search, 500);
Expand Down Expand Up @@ -779,7 +779,7 @@
// When browsing back from search results the main page
// visibility must be reset.
if (!params.search) {
$('#main.content').removeClass('hidden');
$('#main>div.content').removeClass('hidden');
$('#search.content').addClass('hidden');
}
// Revert to the previous title manually since the History
Expand Down Expand Up @@ -1002,7 +1002,7 @@
.css('display', 'none')
.html('&nbsp;Expand&nbsp;description'));
var wrapper = $("<div class='toggle-wrapper'>").append(mainToggle);
$("#main > .docblock").before(wrapper);
$("#main > div > .docblock").before(wrapper);
});

$('pre.line-numbers').on('click', 'span', function() {
Expand Down
18 changes: 12 additions & 6 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ img {
min-width: 70em;
}

nav.sub {
font-size: 16px;
text-transform: uppercase;
}

.sidebar {
width: 200px;
position: absolute;
Expand All @@ -172,6 +167,12 @@ nav.sub {

.content, nav { max-width: 960px; }

nav.sub {
font-size: 16px;
text-transform: uppercase;
max-width: none;
}

/* Everything else */

.js-only, .hidden { display: none !important; }
Expand Down Expand Up @@ -299,7 +300,12 @@ h4 > code, h3 > code {
}

#main { position: relative; }
#main > .since {
#main > div {
margin-left: auto;
margin-right: auto;
position: relative;
}
#main > div > .since {
top: inherit;
font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
Expand Down