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-09-22 21:34:50 +0200
committerGitHub <noreply@github.com>2022-09-22 21:34:50 +0200
commitecbc00fa9e08cdb70bdcde6befcc21e6fab28bff (patch)
tree47fcb72a543c1177675536be7e245a1d8af9454f /src/librustdoc/html/static/css/rustdoc.css
parent41ad7261108de094b5626148148fc017a923166f (diff)
parent8b4c0d90dc403cb9727e80d73c27d4f3de574d60 (diff)
downloadrust-ecbc00fa9e08cdb70bdcde6befcc21e6fab28bff.tar.gz
rust-ecbc00fa9e08cdb70bdcde6befcc21e6fab28bff.zip
Rollup merge of #102118 - notriddle:notriddle/line-numbers, r=GuillaumeGomez
rustdoc: clean up line numbers on code examples

* First commit switches from `display: inline-flex; width: 100%` to `display: flex`.

  `display: inline-flex` was used as part of https://github.com/rust-lang/rust/commit/e961d397cab900c55f8d8c104648852e2b63664e, the original commit that added these line numbers. Does anyone know why it was done this way?

* Second commit makes it so that toggling this checkbox will update the page in real time, just like changing themes does.

Preview: https://notriddle.com/notriddle-rustdoc-test/line-numbers/std/vec/struct.Vec.html
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index f21179ec558..c91f48f87b5 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -577,13 +577,9 @@ h2.location a {
 }
 
 .rustdoc .example-wrap {
-	display: inline-flex;
+	display: flex;
 	margin-bottom: 10px;
-}
-
-.example-wrap {
 	position: relative;
-	width: 100%;
 }
 
 .example-wrap > pre.line-number {