about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/rustdoc.css
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-10 11:03:06 +0100
committerGitHub <noreply@github.com>2022-01-10 11:03:06 +0100
commita4ac4fae416b18f71a2f7ef2772ca4a4cc871828 (patch)
tree862a34e614d55abea159be0a8bbb844268f0de39 /src/librustdoc/html/static/css/rustdoc.css
parentd20affbf8d80f03e2390fd75690a5de5e883f85a (diff)
parent962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 (diff)
downloadrust-a4ac4fae416b18f71a2f7ef2772ca4a4cc871828.tar.gz
rust-a4ac4fae416b18f71a2f7ef2772ca4a4cc871828.zip
Rollup merge of #92602 - jsha:source-link-2, r=GuillaumeGomez
Make source links look cleaner

Change from syntaxy-looking [src] to the plain word "source".

Change the syntaxy-looking `[-]` at the top of the page to say "collapse".

Reduce opacity of rightside content.

Part of #59851

r? `@GuillaumeGomez`

Demo: https://rustdoc.crud.net/jsha/source-link-2/std/string/struct.String.html

[Discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/display.20of.20source.20link).
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index fab64abc3e1..d7f33d6131c 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -137,17 +137,25 @@ h1, h2, h3, h4 {
 	margin: 15px 0 5px 0;
 }
 h1.fqn {
+	margin: 0;
+	padding: 0;
+}
+.main-heading {
 	display: flex;
-	border-bottom: 1px dashed;
-	margin-top: 0;
+	border-bottom: 1px dashed #DDDDDD;
+	padding-bottom: 6px;
+	margin-bottom: 15px;
 
 	/* workaround to keep flex from breaking below 700 px width due to the float: right on the nav
 	   above the h1 */
 	padding-left: 1px;
 }
-h1.fqn > .in-band > a:hover {
+.main-heading a:hover {
 	text-decoration: underline;
 }
+#toggle-all-docs {
+	text-decoration: none;
+}
 /* The only headings that get underlines are:
 	 Markdown-generated headings within the top-doc
 	 Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc)
@@ -195,11 +203,13 @@ h1, h2, h3, h4, h5, h6,
 .sidebar, a.source, .search-input, .search-results .result-name,
 .content table td:first-child > a,
 .item-left > a,
-div.item-list .out-of-band, span.since,
+.out-of-band,
+span.since,
 #source-sidebar, #sidebar-toggle,
 details.rustdoc-toggle > summary::before,
 div.impl-items > div:not(.docblock):not(.item-info),
-.content ul.crate a.crate, a.srclink,
+.content ul.crate a.crate,
+a.srclink,
 /* This selector is for the items listed in the "all items" page. */
 #main-content > ul.docblock > li > a {
 	font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif;
@@ -609,10 +619,12 @@ nav.sub {
 .content .out-of-band {
 	flex-grow: 0;
 	text-align: right;
-	font-size: 1.4375rem;
-	margin: 0px;
+	margin-left: auto;
+	margin-right: 0;
+	font-size: 1.15rem;
 	padding: 0 0 0 12px;
 	font-weight: normal;
+	float: right;
 }
 
 .method > .code-header, .trait-impl > .code-header, .invisible > .code-header {
@@ -1082,7 +1094,7 @@ body.blur > :not(#help) {
 	font-size: initial;
 }
 
-.impl-items .since, .impl .since, .methods .since {
+.rightside {
 	padding-left: 12px;
 	padding-right: 2px;
 	position: initial;
@@ -1160,10 +1172,6 @@ a.test-arrow:hover{
 	font-weight: 300;
 }
 
-.since + .srclink {
-	padding-left: 10px;
-}
-
 .item-spacer {
 	width: 100%;
 	height: 12px;