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-08-02 07:30:41 +0200
committerGitHub <noreply@github.com>2022-08-02 07:30:41 +0200
commit96908527cafd0ea0c8bb9df138e1688fcf3edb0d (patch)
tree4d27de1e52778ef90041ae5c0e21fc47853c4162 /src/librustdoc/html/static/css
parent3357470fb73d6a6dbf636ec96e5eb4936cfe29f8 (diff)
parent9903f41b01b56479698796c9cfcab6bac2f862a4 (diff)
downloadrust-96908527cafd0ea0c8bb9df138e1688fcf3edb0d.tar.gz
rust-96908527cafd0ea0c8bb9df138e1688fcf3edb0d.zip
Rollup merge of #99779 - GuillaumeGomez:fix-item-info-pos-and-height, r=notriddle
Fix item info pos and height

Fixes https://github.com/rust-lang/rust/issues/98266.
Fixes https://github.com/rust-lang/rust/issues/98343.

You can test it [here](https://rustdoc.crud.net/imperio/fix-item-info-pos-and-height/lib2/trait.Trait.html).

Here is a screenshot of the result:

![Screenshot from 2022-07-26 21-55-53](https://user-images.githubusercontent.com/3050060/181100624-18b8b045-5c25-4c7c-9c44-97d55d29b675.png)

r? `@jsha`
Diffstat (limited to 'src/librustdoc/html/static/css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index aecc9aa879a..83fe14550cc 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1111,7 +1111,14 @@ table,
 }
 
 .item-info .stab {
-	display: inline-block;
+	width: fit-content;
+	/* This min-height is needed to unify the height of the stab elements because some of them
+	   have emojis.
+	*/
+	min-height: 36px;
+	display: flex;
+	align-items: center;
+	white-space: pre-wrap;
 }
 .stab {
 	padding: 3px;
@@ -1121,6 +1128,7 @@ table,
 }
 .stab p {
 	display: inline;
+	margin: 0;
 }
 
 .stab .emoji {