about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-08-30 20:15:40 +0200
committerGitHub <noreply@github.com>2018-08-30 20:15:40 +0200
commit2e2980b7220584e7f277c031e52c8fa425e752c4 (patch)
tree37fc6e97f23019ea7a6a2e70a667411d117f18cf
parenteaca5f86496ff0e84639a7867c72d0173cf4ab81 (diff)
parent04b4c40682c01cad8f9bc8d5b3907be91d6f81d4 (diff)
downloadrust-2e2980b7220584e7f277c031e52c8fa425e752c4.tar.gz
rust-2e2980b7220584e7f277c031e52c8fa425e752c4.zip
Rollup merge of #53747 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus
Rustdoc fixes

Fixes rustdoc not scrolling to given lines and invalid unstable display:

<img width="1440" alt="screen shot 2018-08-27 at 23 28 47" src="https://user-images.githubusercontent.com/3050060/44687252-06535e80-aa51-11e8-8512-d7d34d1cb963.png">

r? @QuietMisdreavus
-rw-r--r--src/librustdoc/html/static/main.js1
-rw-r--r--src/librustdoc/html/static/rustdoc.css5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 88c25567d29..51ed6267829 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -242,6 +242,7 @@
         }
     }
 
+    highlightSourceLines(null);
     window.onhashchange = highlightSourceLines;
 
     // Gets the human-readable string for the virtual-key code of the
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index ffe6a40b369..870b024a3ba 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -502,6 +502,7 @@ h4 > code, h3 > code, .invisible > code {
 	margin-left: 33px;
 	margin-top: -13px;
 }
+
 .content .stability::before {
 	content: '˪';
 	font-size: 30px;
@@ -510,6 +511,10 @@ h4 > code, h3 > code, .invisible > code {
 	left: -13px;
 }
 
+#main > .stability {
+	margin-top: 0;
+}
+
 nav {
 	border-bottom: 1px solid;
 	padding-bottom: 10px;