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 @@ -2215,7 +2215,7 @@ details.toggle:not([open]) > summary .docblock {
22152215	overflow-y :  hidden;
22162216}
22172217details .toggle : not ([open ]) >  summary  .docblock  >  : first-child  {
2218- 	max-width :  calc ( 100%    -   1 em ) ;
2218+ 	max-width :  100%  ;
22192219	overflow :  hidden;
22202220	width :  fit-content;
22212221	white-space :  nowrap;
@@ -2230,10 +2230,15 @@ details.toggle:not([open]) > summary .docblock > :first-child::after {
22302230	bottom :  0 ;
22312231	z-index :  1 ;
22322232	background-color :  var (--main-background-color );
2233- 	/* In case this ends up in a heading or a `<code>` item. */ 
2234- 	font-weight :  normal;
22352233	font :  1 rem/1.5 "Source Serif 4" ,  NanumBarunGothic,  serif;
2234+ 	/* To make it look a bit better and not have it stuck to the preceding element. */ 
2235+ 	padding-left :  0.2em  ;
22362236}
2237+ details .toggle : not ([open ]) >  summary  .docblock  >  div : first-child ::after  {
2238+ 	/* This is to make the "..." always appear at the bottom. */ 
2239+ 	padding-top :  calc (1.5em   +  0.75em   -  1.2rem  );
2240+ }
2241+ 
22372242details .toggle  >  summary  .docblock  {
22382243	margin-top :  0.75em  ;
22392244}
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