Skip to content

Commit cedc58b

Browse files
Fix display of features in rustdoc
1 parent cf8d812 commit cedc58b

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/librustdoc/html/static/css/rustdoc.css

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,15 +1081,9 @@ so that we can apply CSS-filters to change the arrow color in themes */
10811081
}
10821082

10831083
.item-info .stab {
1084-
/* This min-height is needed to unify the height of the stab elements because some of them
1085-
have emojis.
1086-
*/
1087-
min-height: 36px;
1088-
display: flex;
1084+
display: block;
10891085
padding: 3px;
10901086
margin-bottom: 5px;
1091-
align-items: center;
1092-
vertical-align: text-bottom;
10931087
}
10941088
.item-name .stab {
10951089
margin-left: 0.3125em;
@@ -1111,18 +1105,26 @@ so that we can apply CSS-filters to change the arrow color in themes */
11111105
background: none;
11121106
color: var(--stab-code-color);
11131107
}
1114-
1115-
.stab .emoji {
1108+
.stab .emoji, .item-info .stab::before {
11161109
font-size: 1.25rem;
1110+
}
1111+
.stab .emoji {
11171112
margin-right: 0.3rem;
11181113
}
1114+
.item-info .stab::before {
1115+
/* ensure badges with emoji and without it have same height */
1116+
content: "\0";
1117+
width: 0;
1118+
display: inline-block;
1119+
color: transparent;
1120+
}
11191121

11201122
/* Black one-pixel outline around emoji shapes */
11211123
.emoji {
11221124
text-shadow:
11231125
1px 0 0 black,
11241126
-1px 0 0 black,
1125-
0 1px 0 black,
1127+
0 1px 0 black,
11261128
0 -1px 0 black;
11271129
}
11281130

0 commit comments

Comments
 (0)