@@ -36,6 +36,8 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
36
36
--button-border-radius : 2px ;
37
37
--toolbar-button-border-radius : 6px ;
38
38
--code-block-border-radius : 6px ;
39
+ --impl-items-indent : 0.3em ;
40
+ --docblock-indent : 24px ;
39
41
}
40
42
41
43
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
@@ -909,7 +911,7 @@ both the code example and the line numbers, so we need to remove the radius in t
909
911
.docblock h6 { font-size : 0.875rem ; }
910
912
911
913
.docblock {
912
- margin-left : 24 px ;
914
+ margin-left : var ( --docblock-indent ) ;
913
915
position : relative;
914
916
}
915
917
@@ -982,7 +984,11 @@ div.where {
982
984
983
985
.item-info {
984
986
display : block;
985
- margin-left : 24px ;
987
+ margin-left : var (--docblock-indent );
988
+ }
989
+ .impl-items > .item-info {
990
+ /* Margin of docblocks + margin of impl block items. */
991
+ margin-left : calc (var (--docblock-indent ) + var (--impl-items-indent ));
986
992
}
987
993
988
994
.item-info code {
@@ -2166,6 +2172,15 @@ details.toggle > summary:not(.hideme)::before {
2166
2172
left : -24px ;
2167
2173
}
2168
2174
2175
+ /* We indent items of an impl block to have a visual marker that these items are part
2176
+ of this impl block. */
2177
+ .impl-items > * : not (.item-info ),
2178
+ /* We also indent the first top doc comment the same to still keep an indent on the
2179
+ doc block while aligning it with the impl block items. */
2180
+ .implementors-toggle > .docblock {
2181
+ margin-left : var (--impl-items-indent );
2182
+ }
2183
+
2169
2184
details .big-toggle > summary : not (.hideme )::before {
2170
2185
left : -34px ;
2171
2186
top : 9px ;
@@ -2255,6 +2270,10 @@ If you update this line, then you also need to update the line with the same war
2255
2270
in src-script.js and main.js
2256
2271
*/
2257
2272
@media (max-width : 700px ) {
2273
+ : root {
2274
+ --impl-items-indent : 0.7em ;
2275
+ }
2276
+
2258
2277
/* When linking to an item with an `id` (for instance, by clicking a link in the sidebar,
2259
2278
or visiting a URL with a fragment like `#method.new`, we don't want the item to be obscured
2260
2279
by the topbar. Anything with an `id` gets scroll-margin-top equal to .mobile-topbar's size.
@@ -2454,19 +2473,20 @@ in src-script.js and main.js
2454
2473
padding-top : 0 ;
2455
2474
}
2456
2475
2457
- /* Position of the "[-]" element. */
2458
- details .toggle : not (.top-doc ) > summary , .impl-items > section {
2476
+ details .implementors-toggle : not (.top-doc ) > summary {
2459
2477
margin-left : 10px ;
2460
2478
}
2461
- .impl-items > details .toggle > summary : not (.hideme )::before ,
2462
- # main-content > details .toggle : not (.top-doc ) > summary ::before ,
2463
- # main-content > div > details .toggle > summary ::before {
2464
- left : -11px ;
2479
+
2480
+ .impl-items > details .toggle > summary : not (.hideme )::before {
2481
+ left : -20px ;
2465
2482
}
2466
2483
2467
2484
/* Align summary-nested and unnested item-info gizmos. */
2485
+ summary > .item-info {
2486
+ margin-left : 10px ;
2487
+ }
2468
2488
.impl-items > .item-info {
2469
- margin-left : 34 px ;
2489
+ margin-left : calc ( var ( --impl-items-indent ) + 10 px ) ;
2470
2490
}
2471
2491
2472
2492
.src nav .sub {
@@ -2500,24 +2520,24 @@ in src-script.js and main.js
2500
2520
}
2501
2521
2502
2522
@media print {
2523
+ : root {
2524
+ --docblock-indent : 0 ;
2525
+ }
2526
+
2503
2527
nav .sidebar , nav .sub , .out-of-band , a .src , # copy-path ,
2504
2528
details .toggle [open ] > summary ::before , details .toggle > summary ::before ,
2505
2529
details .toggle .top-doc > summary {
2506
2530
display : none;
2507
2531
}
2508
2532
2509
- .docblock {
2510
- margin-left : 0 ;
2511
- }
2512
-
2513
2533
main {
2514
2534
padding : 10px ;
2515
2535
}
2516
2536
}
2517
2537
2518
2538
@media (max-width : 464px ) {
2519
- . docblock {
2520
- margin-left : 12px ;
2539
+ : root {
2540
+ --docblock-indent : 12px ;
2521
2541
}
2522
2542
2523
2543
.docblock code {
0 commit comments