From 1c80a5655f645dbd0996fa2b05d8443e84576c38 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 22 Nov 2022 14:48:58 -0700 Subject: [PATCH] rustdoc: make struct fields `display: block` --- src/librustdoc/html/static/css/rustdoc.css | 2 ++ src/test/rustdoc-gui/src/test_docs/lib.rs | 5 +++++ src/test/rustdoc-gui/struct-fields.goml | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 src/test/rustdoc-gui/struct-fields.goml diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 2335f3ff1ce96..97ad00d97ecd3 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -701,6 +701,8 @@ a { } .small-section-header { + /* fields use tags, but should get their own lines */ + display: block; position: relative; } diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs index 8eea5ad01c02d..dea154c931935 100644 --- a/src/test/rustdoc-gui/src/test_docs/lib.rs +++ b/src/test/rustdoc-gui/src/test_docs/lib.rs @@ -408,6 +408,11 @@ pub struct WithGenerics