about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-11-01 13:32:08 +0800
committerGitHub <noreply@github.com>2017-11-01 13:32:08 +0800
commit07df45d363dcf7c7bd75ee4ed53a14a9709ef227 (patch)
tree6017479c88bc4ccfc07374eed622b7c2d65e3a88
parentfc3e12a03c8d5298ddfac6fb8c14c1b918eb55a8 (diff)
parent237ad82f3cea85ff1272701b3d6ebc9641fd308e (diff)
downloadrust-07df45d363dcf7c7bd75ee4ed53a14a9709ef227.tar.gz
rust-07df45d363dcf7c7bd75ee4ed53a14a9709ef227.zip
Rollup merge of #45450 - GuillaumeGomez:overlap-link, r=QuietMisdreavus
Fix title heading overlap in rust doc

Fixes #45158.

To be noted that this margin only appears when a title is the first element.

<img width="1440" alt="screen shot 2017-10-22 at 16 08 44" src="https://user-images.githubusercontent.com/3050060/31862746-6411070e-b743-11e7-9a75-4159e1f7f1d6.png">

r? @rust-lang/docs
-rw-r--r--src/librustdoc/html/static/rustdoc.css12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index dcb0de3bb92..398a692f8df 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -545,7 +545,8 @@ a {
 .content .search-results td:first-child { padding-right: 0; }
 .content .search-results td:first-child a { padding-right: 10px; }
 
-tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black;
+tr.result span.primitive::after {
+	content: ' (primitive type)'; font-style: italic; color: black;
 }
 
 body.blur > :not(#help) {
@@ -761,6 +762,15 @@ span.since {
 	margin-top: 5px;
 }
 
+.docblock > .section-header:first-child {
+	margin-left: 15px;
+	margin-top: 0;
+}
+
+.docblock > .section-header:first-child:hover > a:before {
+	left: -10px;
+}
+
 .enum > .collapsed, .struct > .collapsed {
 	margin-bottom: 25px;
 }