@@ -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.5em ;
40
+ --docblock-indent : 24px ;
39
41
}
40
42
41
43
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
@@ -908,7 +910,7 @@ both the code example and the line numbers, so we need to remove the radius in t
908
910
.docblock h6 { font-size : 0.875rem ; }
909
911
910
912
.docblock {
911
- margin-left : 24 px ;
913
+ margin-left : var ( --docblock-indent ) ;
912
914
position : relative;
913
915
}
914
916
@@ -981,7 +983,11 @@ div.where {
981
983
982
984
.item-info {
983
985
display : block;
984
- margin-left : 24px ;
986
+ margin-left : var (--docblock-indent );
987
+ }
988
+ .impl-items > .item-info {
989
+ /* Margin of docblocks + margin of impl block items. */
990
+ margin-left : calc (var (--docblock-indent ) + var (--impl-items-indent ));
985
991
}
986
992
987
993
.item-info code {
@@ -2154,6 +2160,15 @@ details.toggle > summary:not(.hideme)::before {
2154
2160
left : -24px ;
2155
2161
}
2156
2162
2163
+ /* We indent items of an impl block to have a visual marker that these items are part
2164
+ of this impl block. */
2165
+ .impl-items > * : not (.item-info ),
2166
+ /* We also indent the first top doc comment the same to still keep an indent on the
2167
+ doc block while aligning it with the impl block items. */
2168
+ .implementors-toggle > .docblock {
2169
+ margin-left : var (--impl-items-indent );
2170
+ }
2171
+
2157
2172
details .big-toggle > summary : not (.hideme )::before {
2158
2173
left : -34px ;
2159
2174
top : 9px ;
@@ -2448,8 +2463,11 @@ in src-script.js and main.js
2448
2463
}
2449
2464
2450
2465
/* Align summary-nested and unnested item-info gizmos. */
2466
+ .item-info {
2467
+ margin-left : 10px ;
2468
+ }
2451
2469
.impl-items > .item-info {
2452
- margin-left : 34 px ;
2470
+ margin-left : 28 px ;
2453
2471
}
2454
2472
2455
2473
.src nav .sub {
@@ -2483,24 +2501,24 @@ in src-script.js and main.js
2483
2501
}
2484
2502
2485
2503
@media print {
2504
+ : root {
2505
+ --docblock-indent : 0 ;
2506
+ }
2507
+
2486
2508
nav .sidebar , nav .sub , .out-of-band , a .src , # copy-path ,
2487
2509
details .toggle [open ] > summary ::before , details .toggle > summary ::before ,
2488
2510
details .toggle .top-doc > summary {
2489
2511
display : none;
2490
2512
}
2491
2513
2492
- .docblock {
2493
- margin-left : 0 ;
2494
- }
2495
-
2496
2514
main {
2497
2515
padding : 10px ;
2498
2516
}
2499
2517
}
2500
2518
2501
2519
@media (max-width : 464px ) {
2502
- . docblock {
2503
- margin-left : 12px ;
2520
+ : root {
2521
+ --docblock-indent : 12px ;
2504
2522
}
2505
2523
2506
2524
.docblock code {
0 commit comments