File tree Expand file tree Collapse file tree 4 files changed +41
-5
lines changed
src/librustdoc/html/static/css Expand file tree Collapse file tree 4 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -2200,7 +2200,7 @@ details.toggle:not([open]) > summary .docblock {
22002200 overflow-y : hidden;
22012201}
22022202details .toggle : not ([open ]) > summary .docblock > : first-child {
2203- max-width : calc ( 100% - 1 em ) ;
2203+ max-width : 100% ;
22042204 overflow : hidden;
22052205 width : fit-content;
22062206 white-space : nowrap;
@@ -2215,10 +2215,15 @@ details.toggle:not([open]) > summary .docblock > :first-child::after {
22152215 bottom : 0 ;
22162216 z-index : 1 ;
22172217 background-color : var (--main-background-color );
2218- /* In case this ends up in a heading or a `<code>` item. */
2219- font-weight : normal;
22202218 font : 1 rem/1.5 "Source Serif 4" , NanumBarunGothic, serif;
2219+ /* To make it look a bit better and not have it stuck to the preceding element. */
2220+ padding-left : 0.2em ;
22212221}
2222+ details .toggle : not ([open ]) > summary .docblock > div : first-child ::after {
2223+ /* This is to make the "..." always appear at the bottom. */
2224+ padding-top : calc (1.5em + 0.75em - 1.2rem );
2225+ }
2226+
22222227details .toggle > summary .docblock {
22232228 margin-top : 0.75em ;
22242229}
Original file line number Diff line number Diff line change @@ -31,3 +31,12 @@ assert: (|impl_y| + |impl_height|) <= (|doc_y| + |doc_height|)
3131call-function: ("compare-size-and-pos", {"nth_impl": 2})
3232// The second impl block has a short line.
3333assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|)
34+
35+ // FIXME: Needs `if` condition to make this test check that `padding-top` on the "..." element
36+ // is as expected for tables.
37+ call-function: ("compare-size-and-pos", {"nth_impl": 3})
38+ assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|)
39+ call-function: ("compare-size-and-pos", {"nth_impl": 4})
40+ assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|)
41+ call-function: ("compare-size-and-pos", {"nth_impl": 5})
42+ assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|)
Original file line number Diff line number Diff line change 22go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
33set-window-size: (800, 1000)
44// "scrollWidth" should be superior than "clientWidth".
5- assert-property: ("body", {"scrollWidth": 1114 , "clientWidth": 800})
5+ assert-property: ("body", {"scrollWidth": 1776 , "clientWidth": 800})
66
77// Both properties should be equal (ie, no scroll on the code block).
8- assert-property: (".example-wrap .rust", {"scrollWidth": 1000 , "clientWidth": 1000 })
8+ assert-property: (".example-wrap .rust", {"scrollWidth": 1662 , "clientWidth": 1662 })
Original file line number Diff line number Diff line change @@ -669,3 +669,25 @@ impl ImplDoc {
669669impl ImplDoc {
670670 pub fn bar2 ( ) { }
671671}
672+
673+ // ignore-tidy-linelength
674+ /// | this::is::a::kinda::very::long::header::number::one | this::is::a::kinda::very::long::header::number::two | this::is::a::kinda::very::long::header::number::three |
675+ /// |-|-|-|
676+ /// | bla | bli | blob |
677+ impl ImplDoc {
678+ pub fn bar3 ( ) { }
679+ }
680+
681+ /// # h1
682+ ///
683+ /// bla
684+ impl ImplDoc {
685+ pub fn bar4 ( ) { }
686+ }
687+
688+ /// * list
689+ /// * list
690+ /// * list
691+ impl ImplDoc {
692+ pub fn bar5 ( ) { }
693+ }
You can’t perform that action at this time.
0 commit comments