use rustdoc's body classes on the rustdoc-container #273
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #264 (requires updating prod server to tomorrow's nightly to include rust-lang/rust#56498 - however, today's nightly introduces the new source sidebar files mentioned in #270 so there will need to be another PR before that's totally ready)
Upstream rustdoc sets some styles on the
<body>
tag that affect some CSS rules. Most notably, on[src]
pages, it sets thesource
class. Docs.rs doesn't currently carry over all of those styles (it does hardcode therustdoc
class, set on all pages, but misses everything else), which has caused some problems getting the new-style line numbers to work. This PR changes the rustdoc page handling to extract any classes being set on the<body>
tag, so it can save them and apply them to the template when sending the page.