Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upuse rustdoc's body classes on the rustdoc-container #273
Conversation
onur
self-requested a review
Dec 17, 2018
onur
approved these changes
Dec 17, 2018
|
Thanks for solving this problem I'll merge after server migration. |
onur
merged commit d066faa
into
rust-lang:master
Dec 18, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
QuietMisdreavus commentedDec 6, 2018
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 thesourceclass. Docs.rs doesn't currently carry over all of those styles (it does hardcode therustdocclass, 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.