about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css
diff options
context:
space:
mode:
authorcynecx <me@cynecx.net>2021-10-10 00:52:14 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-11-29 11:07:18 +0100
commit1e98fb10274ea0245f865ddb1e295e454382000b (patch)
tree2590a2eb6a745b17f8b25e32b68b3445da46b9e3 /src/librustdoc/html/static/css
parent135281ed1525db15edd8ebd092aa10aa40df2386 (diff)
downloadrust-1e98fb10274ea0245f865ddb1e295e454382000b.tar.gz
rust-1e98fb10274ea0245f865ddb1e295e454382000b.zip
rustdoc: fix source view
Diffstat (limited to 'src/librustdoc/html/static/css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css47
1 files changed, 43 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 6135038a404..9cd05a7d6f1 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -261,11 +261,19 @@ main {
 	overflow-y: auto;
 }
 
+.source main {
+	padding: 15px;
+}
+
 .main-inner {
 	max-width: 960px;
 	margin-right: auto;
 }
 
+.source .main-inner {
+	max-width: unset;
+}
+
 details:not(.rustdoc-toggle) summary {
 	margin-bottom: .6em;
 }
@@ -310,6 +318,7 @@ li {
 }
 
 nav.sub {
+	position: relative;
 	font-size: 16px;
 	text-transform: uppercase;
 }
@@ -325,6 +334,10 @@ nav.sub {
 	height: 100vh;
 }
 
+.source .sidebar {
+	display: none;
+}
+
 /* Improve the scrollbar display on firefox */
 * {
 	scrollbar-width: initial;
@@ -354,6 +367,18 @@ nav.sub {
 	display: none !important;
 }
 
+.logo-source {
+	display: none;
+}
+
+.source .logo-source {
+	display: block;
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 200px;
+}
+
 .logo-container {
 	height: 100px;
 	width: 100px;
@@ -716,6 +741,9 @@ nav:not(.sidebar) {
 	padding-bottom: 10px;
 	margin-bottom: 25px;
 }
+.source nav:not(.sidebar).sub {
+	margin-left: 230px;
+}
 nav.main {
 	padding: 20px 0;
 	text-align: center;
@@ -805,6 +833,7 @@ h2.small-section-header > .anchor {
 
 .search-container {
 	position: relative;
+	max-width: 960px;
 }
 .search-container > div {
 	display: inline-flex;
@@ -1357,8 +1386,8 @@ pre.rust {
 
 .theme-picker {
 	position: absolute;
-	left: 11px;
-	top: 19px;
+	left: -34px;
+	top: 9px;
 }
 
 .theme-picker button {
@@ -1767,10 +1796,18 @@ details.rustdoc-toggle[open] > summary.hideme::after {
 		margin-bottom: 10px;
 	}
 
+	.source nav:not(.sidebar).sub {
+		margin-left: 32px;
+	}
+
 	.content {
 		margin-left: 0px;
 	}
 
+	.source .content {
+		margin-top: 10px;
+	}
+
 	#search {
 		margin-left: 0;
 		padding: 0;
@@ -1781,8 +1818,6 @@ details.rustdoc-toggle[open] > summary.hideme::after {
 	}
 
 	.theme-picker {
-		left: 10px;
-		top: 9px;
 		z-index: 1;
 	}
 
@@ -1909,6 +1944,10 @@ details.rustdoc-toggle[open] > summary.hideme::after {
 	.search-results div.desc, .search-results .result-description, .item-right {
 		padding-left: 2em;
 	}
+
+	.source .logo-source {
+		display: none;
+	}
 }
 
 @media print {