117117h3 {
118118 font-size : 1.3em ;
119119}
120- h1 , h2 , h3 : not (.impl ): not (.method ): not (.type ): not (.tymethod ): not (.notable ),
121- h4 : not (.method ): not (.type ): not (.tymethod ): not (.associatedconstant ): not (.associatedtype ) {
120+ h1 , h2 , h3 : not (.notable ), h4 {
122121 font-weight : 500 ;
123122 margin : 20px 0 15px 0 ;
124123 padding-bottom : 6px ;
@@ -135,30 +134,38 @@ h1.fqn {
135134h1 .fqn > .in-band > a : hover {
136135 text-decoration : underline;
137136}
138- h2 , h3 : not (.impl ): not (.method ): not (.type ): not (.tymethod ),
139- h4 : not (.method ): not (.type ): not (.tymethod ): not (.associatedconstant ): not (.associatedtype ) {
137+ h2 , h3 , h4 {
140138 border-bottom : 1px solid;
141139}
142- h3 .impl , h3 .method , h4 .method , h3 .type , h4 .type , h4 .associatedconstant , h4 .associatedtype {
140+ div [aria-level = "3" ].impl , div [aria-level = "3" ].method , div [aria-level = "4" ].method ,
141+ div [aria-level = "3" ].type , div [aria-level = "4" ].type , div [aria-level = "4" ].associatedconstant ,
142+ div [aria-level = "4" ].associatedtype {
143143 flex-basis : 100% ;
144144 font-weight : 600 ;
145145 margin-top : 16px ;
146146 margin-bottom : 10px ;
147147 position : relative;
148148}
149- h3 .impl , h3 .method , h4 .method .trait-impl , h3 .type ,
150- h4 .type .trait-impl , h4 .associatedconstant .trait-impl , h4 .associatedtype .trait-impl {
149+ div [aria-level = "3" ].impl , div [aria-level = "3" ].method , div [aria-level = "4" ].method .trait-impl ,
150+ div [aria-level = "3" ].type , div [aria-level = "4" ].type .trait-impl ,
151+ div [aria-level = "4" ].associatedconstant .trait-impl ,
152+ div [aria-level = "4" ].associatedtype .trait-impl {
151153 padding-left : 15px ;
152154}
153155
156+ div .impl-items > div {
157+ padding-left : 0 ;
158+ }
159+
154160h1 , h2 , h3 , h4 ,
155161.sidebar , a .source , .search-input , .search-results .result-name ,
156162.content table td : first-child > a ,
157- div .item-list .out-of-band ,
163+ . collapse-toggle , div .item-list .out-of-band , span . since ,
158164# source-sidebar , # sidebar-toggle ,
159165details .rustdoc-toggle > summary ::before ,
160166details .undocumented > summary ::before ,
161- .content ul .crate a .crate ,
167+ div .impl-items > div : not (.docblock ): not (.item-info ),
168+ .content ul .crate a .crate , a .srclink ,
162169/* This selector is for the items listed in the "all items" page. */
163170# main > ul .docblock > li > a {
164171 font-family : "Fira Sans" , Arial, sans-serif;
@@ -313,8 +320,6 @@ nav.sub {
313320 margin-bottom : 14px ;
314321}
315322.block h2 , .block h3 {
316- margin-top : 0 ;
317- margin-bottom : 8px ;
318323 text-align : center;
319324}
320325.block ul , .block li {
@@ -462,15 +467,15 @@ nav.sub {
462467 font-weight : normal;
463468}
464469
465- h3 .impl > .out-of-band {
470+ div [ aria-level = "3" ] .impl > .out-of-band {
466471 font-size : 21px ;
467472}
468473
469- h4 .method > .out-of-band {
474+ div [ aria-level = "4" ] .method > .out-of-band {
470475 font-size : 19px ;
471476}
472477
473- h4 > code , h3 > code , .invisible > code {
478+ div [ aria-level = "3" ] > code , div [ aria-level = "4" ] > code , .invisible > code {
474479 max-width : calc (100% - 41px );
475480 display : block;
476481}
@@ -543,7 +548,7 @@ h4 > code, h3 > code, .invisible > code {
543548}
544549.content .multi-column li { width : 100% ; display : inline-block; }
545550
546- .content .method {
551+ .content > div . methods > div .method {
547552 font-size : 1em ;
548553 position : relative;
549554}
@@ -555,7 +560,7 @@ h4 > code, h3 > code, .invisible > code {
555560 font-size : 0.8em ;
556561}
557562
558- .content .methods > div : not (.notable-traits ): not (.methods ) {
563+ .content .methods > div : not (.notable-traits ): not (.method ) {
559564 margin-left : 40px ;
560565 margin-bottom : 15px ;
561566}
@@ -564,7 +569,7 @@ h4 > code, h3 > code, .invisible > code {
564569 margin-left : 20px ;
565570 margin-top : -34px ;
566571}
567- .content .docblock > .impl-items > h4 {
572+ .content .docblock > .impl-items > div [ aria-level = "4" ] {
568573 border-bottom : 0 ;
569574}
570575.content .docblock > .impl-items .table-display {
688693 text-decoration : underline;
689694}
690695
691- .invisible > .srclink , h4 > code + .srclink , h3 > code + .srclink {
696+ .invisible > .srclink ,
697+ div [aria-level = "3" ] > code + .srclink , div [aria-level = "4" ] > code + .srclink {
692698 position : absolute;
693699 top : 0 ;
694700 right : 0 ;
@@ -923,7 +929,8 @@ body.blur > :not(#help) {
923929 flex-grow : 1 ;
924930}
925931
926- .impl-items h4 , h4 .impl , h3 .impl , .methods h3 {
932+ .impl-items div [aria-level = "4" ], div [aria-level = "4" ].impl , div [aria-level = "3" ].impl ,
933+ .methods div [aria-level = "3" ] {
927934 display : flex;
928935 flex-basis : 100% ;
929936 font-size : 16px ;
@@ -985,6 +992,45 @@ a.test-arrow:hover{
985992 font-weight : 300 ;
986993}
987994
995+ .collapse-toggle {
996+ font-weight : 300 ;
997+ position : absolute;
998+ left : -23px ;
999+ top : 0 ;
1000+ }
1001+
1002+ div [aria-level = "3" ] > .collapse-toggle , div [aria-level = "4" ] > .collapse-toggle {
1003+ font-size : 0.8em ;
1004+ top : 5px ;
1005+ }
1006+
1007+ .toggle-wrapper > .collapse-toggle {
1008+ left : -24px ;
1009+ margin-top : 0px ;
1010+ }
1011+
1012+ .toggle-wrapper {
1013+ position : relative;
1014+ margin-top : 0 ;
1015+ }
1016+
1017+ .toggle-wrapper .collapsed {
1018+ height : 25px ;
1019+ transition : height .2s ;
1020+ margin-bottom : .6em ;
1021+ }
1022+
1023+ .collapse-toggle > .inner {
1024+ display : inline-block;
1025+ width : 1.2ch ;
1026+ text-align : center;
1027+ }
1028+
1029+ .collapse-toggle .hidden-default {
1030+ position : relative;
1031+ margin-left : 20px ;
1032+ }
1033+
9881034.since + .srclink {
9891035 display : table-cell;
9901036 padding-left : 10px ;
@@ -1197,7 +1243,7 @@ pre.rust {
11971243 margin-left : 5px ;
11981244}
11991245
1200- h4 > .notable-traits {
1246+ div [ aria-level = "4" ] > .notable-traits {
12011247 position : absolute;
12021248 left : -44px ;
12031249 top : 2px ;
@@ -1615,7 +1661,7 @@ details.undocumented[open] > summary::before {
16151661 padding : 0 ;
16161662 }
16171663
1618- .content h4 > .out-of-band {
1664+ .content div [ aria-level = "4" ] > .out-of-band {
16191665 position : inherit;
16201666 }
16211667
@@ -1638,7 +1684,7 @@ details.undocumented[open] > summary::before {
16381684 z-index : 1 ;
16391685 }
16401686
1641- h4 > .notable-traits {
1687+ div [ aria-level = "4" ] > .notable-traits {
16421688 position : absolute;
16431689 left : -22px ;
16441690 top : 24px ;
0 commit comments