about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-20 23:35:16 +0100
committerGitHub <noreply@github.com>2022-12-20 23:35:16 +0100
commit50cfffa7a2745ccda74cc9b282eae6fc7b869985 (patch)
tree00d0f5860e9f5dd611968489742c8af1a1b991a0 /src/librustdoc/html/static/css
parenta039b2218c84880db74b0a564662edbe380d9e39 (diff)
parent168e3da8126f78d213e17de7fb548a9bf76ee393 (diff)
downloadrust-50cfffa7a2745ccda74cc9b282eae6fc7b869985.tar.gz
rust-50cfffa7a2745ccda74cc9b282eae6fc7b869985.zip
Rollup merge of #105964 - notriddle:notriddle/scraped-example-length, r=GuillaumeGomez
rustdoc: prevent CSS layout of line numbers shrinking into nothing

Before:

![image](https://user-images.githubusercontent.com/1593513/208730117-039442b4-01ee-4eee-8001-26429f9d54c3.png)

After:

![image](https://user-images.githubusercontent.com/1593513/208730167-ab2f95a9-1eea-48f9-a9c9-3a69d9db484a.png)
Diffstat (limited to 'src/librustdoc/html/static/css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 11e34a3fc7d..055a5665cf0 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -543,6 +543,7 @@ ul.block, .block li {
 .rustdoc .example-wrap > pre.example-line-numbers,
 .rustdoc .example-wrap > pre.src-line-numbers {
 	flex-grow: 0;
+	min-width: fit-content; /* prevent collapsing into nothing in truncated scraped examples */
 	overflow: initial;
 	text-align: right;
 	-webkit-user-select: none;