diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 51465bafc42e2..245c9fee59c7f 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -695,7 +695,7 @@ span.since {
margin-bottom: 25px;
}
-.enum .variant, .struct .structfield, .union .structfield {
+#main > .variant, #main > .structfield {
display: block;
}