about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/rustdoc.css
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css70
1 files changed, 59 insertions, 11 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index b994a43868c..d0612e997fd 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -38,6 +38,13 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
 	--code-block-border-radius: 6px;
 	--impl-items-indent: 0.3em;
 	--docblock-indent: 24px;
+	--font-family: "Source Serif 4", NanumBarunGothic, serif;
+	--font-family-code: "Source Code Pro", monospace;
+}
+
+:root.sans-serif {
+	--font-family: "Fira Sans", sans-serif;
+	--font-family-code: "Fira Mono", monospace;
 }
 
 /* See FiraSans-LICENSE.txt for the Fira Sans license. */
@@ -51,12 +58,44 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
 }
 @font-face {
 	font-family: 'Fira Sans';
+	font-style: italic;
+	font-weight: 400;
+	src: local('Fira Sans Italic'),
+		url("FiraSans-Italic-81dc35de.woff2") format("woff2");
+	font-display: swap;
+}
+@font-face {
+	font-family: 'Fira Sans';
 	font-style: normal;
 	font-weight: 500;
 	src: local('Fira Sans Medium'),
 		url("FiraSans-Medium-e1aa3f0a.woff2") format("woff2");
 	font-display: swap;
 }
+@font-face {
+	font-family: 'Fira Sans';
+	font-style: italic;
+	font-weight: 500;
+	src: local('Fira Sans Medium Italic'),
+		url("FiraSans-MediumItalic-ccf7e434.woff2") format("woff2");
+	font-display: swap;
+}
+@font-face {
+	font-family: 'Fira Mono';
+	font-style: normal;
+	font-weight: 400;
+	src: local('Fira Mono'),
+		url("FiraMono-Regular-87c26294.woff2") format("woff2");
+	font-display: swap;
+}
+@font-face {
+	font-family: 'Fira Mono';
+	font-style: normal;
+	font-weight: 500;
+	src: local('Fira Mono Medium'),
+		url("FiraMono-Medium-86f75c8c.woff2") format("woff2");
+	font-display: swap;
+}
 
 /* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */
 @font-face {
@@ -78,6 +117,14 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
 @font-face {
 	font-family: 'Source Serif 4';
 	font-style: normal;
+	font-weight: 500;
+	src: local('Source Serif 4 Semibold'),
+		url("SourceSerif4-Semibold-457a13ac.ttf.woff2") format("woff2");
+	font-display: swap;
+}
+@font-face {
+	font-family: 'Source Serif 4';
+	font-style: normal;
 	font-weight: 700;
 	src: local('Source Serif 4 Bold'),
 		url("SourceSerif4-Bold-6d4fd4c0.ttf.woff2") format("woff2");
@@ -126,7 +173,7 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
 body {
 	/* Line spacing at least 1.5 per Web Content Accessibility Guidelines
 	   https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */
-	font: 1rem/1.5 "Source Serif 4", NanumBarunGothic, serif;
+	font: 1rem/1.5 var(--font-family);
 	margin: 0;
 	position: relative;
 	/* We use overflow-wrap: break-word for Safari, which doesn't recognize
@@ -192,15 +239,12 @@ h1, h2, h3, h4 {
 .rustdoc-breadcrumbs {
 	grid-area: main-heading-breadcrumbs;
 	line-height: 1.25;
-	display: flex;
-	flex-wrap: wrap;
-	align-items: end;
 	padding-top: 5px;
+	position: relative;
+	z-index: 1;
 }
 .rustdoc-breadcrumbs a {
-	padding: 4px 0;
-	margin: -4px 0;
-	z-index: 1;
+	padding: 5px 0 7px;
 }
 /* The only headings that get underlines are:
 	 Markdown-generated headings within the top-doc
@@ -383,7 +427,7 @@ details:not(.toggle) summary {
 }
 
 code, pre, .code-header, .type-signature {
-	font-family: "Source Code Pro", monospace;
+	font-family: var(--font-family-code);
 }
 .docblock code, .item-table dd code {
 	border-radius: 3px;
@@ -2166,7 +2210,8 @@ details.toggle > summary:not(.hideme)::before {
 	top: 4px;
 }
 
-.impl-items > details.toggle > summary:not(.hideme)::before {
+.impl-items > details.toggle > summary:not(.hideme)::before,
+#main-content > .methods > details.toggle > summary:not(.hideme)::before {
 	position: absolute;
 	left: -24px;
 }
@@ -2176,7 +2221,9 @@ details.toggle > summary:not(.hideme)::before {
 .impl-items > *:not(.item-info),
 /* We also indent the first top doc comment the same to still keep an indent on the
 	doc block while aligning it with the impl block items. */
-.implementors-toggle > .docblock {
+.implementors-toggle > .docblock,
+/* We indent trait items as well. */
+#main-content > .methods > :not(.item-info) {
 	margin-left: var(--impl-items-indent);
 }
 
@@ -2508,7 +2555,8 @@ in src-script.js and main.js
 		margin-left: 10px;
 	}
 
-	.impl-items > details.toggle > summary:not(.hideme)::before {
+	.impl-items > details.toggle > summary:not(.hideme)::before,
+	#main-content > .methods > details.toggle > summary:not(.hideme)::before {
 		left: -20px;
 	}