Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f6e64b1

Browse files
authored
Unrolled build for rust-lang#131394
Rollup merge of rust-lang#131394 - ismailarilik:fix/rustdoc/add-space-between-struct-fields-and-their-descriptions, r=GuillaumeGomez fix(rustdoc): add space between struct fields and their descriptions Stolen from rust-lang#128541. Fixes rust-lang#128260. <table> <thead> <tr> <th scope="col">Before</th> <th scope="col">After</th> </tr> </thead> <tbody> <tr> <td scope="row"> <img src="https://github.com/user-attachments/assets/b1d3cb47-77c9-4897-a5d2-2192b11cb8a3" /> </td> <td> <img src="https://github.com/user-attachments/assets/0b104672-d2be-49f4-ac9b-3506526fe2f1" /> </td> </tr> </tbody> </table> <table> <thead> <tr> <th scope="col">Before</th> <th scope="col">After</th> </tr> </thead> <tbody> <tr> <td scope="row"> <img src="https://github.com/user-attachments/assets/650c3e74-a067-492a-9ba3-557f9214f875" /> </td> <td> <img src="https://github.com/user-attachments/assets/413ef9b0-8fca-4e16-978a-7b88d05299dc" /> </td> </tr> </tbody> </table> Unlike original PR, I didn't add space between field headers; I put it between headers and descriptions. So if there are only headers, the space is not changed. Otherwise, I put a space like the space between paragraphs (.75em) which makes sense for me but feel free to adjust it or ask me to do so. r? `@GuillaumeGomez`
2 parents f496659 + 076927b commit f6e64b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ h4.code-header {
230230
padding: 0;
231231
white-space: pre-wrap;
232232
}
233+
.structfield {
234+
margin: 0.6em 0;
235+
}
233236

234237
#crate-search,
235238
h1, h2, h3, h4, h5, h6,

0 commit comments

Comments
 (0)