about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/rustdoc.css
diff options
context:
space:
mode:
authorInfra <1011X@users.noreply.github.com>2022-07-08 01:29:35 -0400
committerGitHub <noreply@github.com>2022-07-08 01:29:35 -0400
commit0b5000776083365b71fe78a3379f87a75cf9fb8a (patch)
treea091c31f0fa277de5fbd39080c0cf976aaed4974 /src/librustdoc/html/static/css/rustdoc.css
parent9b21131278cc38ab8d79444de340015faadd061c (diff)
downloadrust-0b5000776083365b71fe78a3379f87a75cf9fb8a.tar.gz
rust-0b5000776083365b71fe78a3379f87a75cf9fb8a.zip
improve print styles
this change removes some interactive elements in `@media print` form.

more specifically, it removes the source links, the expand/collapse toggle buttons, and the `#copy-path` button.
it also adjusts some spacing and removes the `.top-doc` description completely if it's currently collapsed.
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index b3dc60d880b..a37cb6f6fe0 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -2056,9 +2056,19 @@ in storage.js plus the media query with (min-width: 701px)
 }
 
 @media print {
-	nav.sub, .content .out-of-band {
+	nav.sidebar, nav.sub, .content .out-of-band, a.srclink, #copy-path,
+    details.rustdoc-toggle[open] > summary::before, details.rustdoc-toggle > summary::before,
+    details.rustdoc-toggle.top-doc > summary {
 		display: none;
 	}
+    
+    .docblock {
+        margin-left: 0;
+    }
+    
+    main {
+        padding-left: 15px;
+    }
 }
 
 @media (max-width: 464px) {