@@ -108,7 +108,9 @@ html {
108
108
/* General structure and fonts */
109
109
110
110
body {
111
- font : 1 rem/1.4 "Source Serif 4" , NanumBarunGothic, serif;
111
+ /* Line spacing at least 1.5 per Web Content Accessibility Guidelines
112
+ https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */
113
+ font : 1 rem/1.5 "Source Serif 4" , NanumBarunGothic, serif;
112
114
margin : 0 ;
113
115
position : relative;
114
116
/* We use overflow-wrap: break-word for Safari, which doesn't recognize
@@ -124,13 +126,13 @@ body {
124
126
}
125
127
126
128
h1 {
127
- font-size : 1.5rem ;
129
+ font-size : 1.5rem ; /* 24px */
128
130
}
129
131
h2 {
130
- font-size : 1.4 rem ;
132
+ font-size : 1.375 rem ; /* 22px */
131
133
}
132
134
h3 {
133
- font-size : 1.3 rem ;
135
+ font-size : 1.25 rem ; /* 20px */
134
136
}
135
137
h1 , h2 , h3 , h4 , h5 , h6 {
136
138
font-weight : 500 ;
170
172
border-bottom : 1px solid;
171
173
}
172
174
h3 .code-header {
173
- font-size : 1.1 rem ;
175
+ font-size : 1.125 rem ; /* 18px */
174
176
}
175
177
h4 .code-header {
176
178
font-size : 1rem ;
@@ -221,19 +223,18 @@ a.srclink,
221
223
font-family : "Fira Sans" , Arial, NanumBarunGothic, sans-serif;
222
224
}
223
225
224
- .content ul .crate a .crate {
225
- font-size : 1 rem/1.6;
226
- }
227
-
228
226
ol , ul {
229
- padding-left : 25 px ;
227
+ padding-left : 24 px ;
230
228
}
231
229
ul ul , ol ul , ul ol , ol ol {
232
- margin-bottom : .6 em ;
230
+ margin-bottom : .625 em ;
233
231
}
234
232
235
233
p {
236
- margin : 0 0 .6em 0 ;
234
+ /* Paragraph spacing at least 1.5 times line spacing per Web Content Accessibility Guidelines.
235
+ Line-height is 1.5rem, so line spacing is .5rem; .75em is 1.5 times that.
236
+ https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html */
237
+ margin : 0 0 .75em 0 ;
237
238
}
238
239
239
240
summary {
@@ -303,7 +304,7 @@ code, pre, a.test-arrow, .code-header {
303
304
}
304
305
.docblock code , .docblock-short code {
305
306
border-radius : 3px ;
306
- padding : 0 0.1 em ;
307
+ padding : 0 0.125 em ;
307
308
}
308
309
.docblock pre code , .docblock-short pre code {
309
310
padding : 0 ;
@@ -364,7 +365,7 @@ nav.sub {
364
365
}
365
366
366
367
.sidebar {
367
- font-size : 0.9 rem ;
368
+ font-size : 0.875 rem ;
368
369
width : 250px ;
369
370
min-width : 200px ;
370
371
overflow-y : scroll;
@@ -476,8 +477,8 @@ nav.sub {
476
477
.block a ,
477
478
h2 .location a {
478
479
display : block;
479
- padding : 0.3 rem ;
480
- margin-left : -0.3 rem ;
480
+ padding : 0.25 rem ;
481
+ margin-left : -0.25 rem ;
481
482
482
483
text-overflow : ellipsis;
483
484
overflow : hidden;
@@ -497,7 +498,7 @@ h2.location a {
497
498
}
498
499
499
500
.sidebar h3 {
500
- font-size : 1.1 rem ;
501
+ font-size : 1.125 rem ; /* 18px */
501
502
font-weight : 500 ;
502
503
padding : 0 ;
503
504
margin : 0 ;
@@ -598,18 +599,18 @@ h2.location a {
598
599
white-space : pre-wrap;
599
600
}
600
601
601
- .top-doc .docblock h2 { font-size : 1.3 rem ; }
602
- .top-doc .docblock h3 { font-size : 1.15 rem ; }
602
+ .top-doc .docblock h2 { font-size : 1.375 rem ; }
603
+ .top-doc .docblock h3 { font-size : 1.25 ; }
603
604
.top-doc .docblock h4 ,
604
605
.top-doc .docblock h5 {
605
- font-size : 1.1 rem ;
606
+ font-size : 1.125 rem ;
606
607
}
607
608
.top-doc .docblock h6 {
608
609
font-size : 1rem ;
609
610
}
610
611
611
612
.docblock h5 { font-size : 1rem ; }
612
- .docblock h6 { font-size : 0.95 rem ; }
613
+ .docblock h6 { font-size : 0.875 rem ; }
613
614
614
615
.docblock {
615
616
margin-left : 24px ;
@@ -623,12 +624,12 @@ h2.location a {
623
624
624
625
.content .out-of-band {
625
626
flex-grow : 0 ;
626
- font-size : 1.15 rem ;
627
+ font-size : 1.125 rem ;
627
628
font-weight : normal;
628
629
float : right;
629
630
}
630
631
631
- .method > .code-header , .trait-impl > .code-header , . invisible > . code-header {
632
+ .method > .code-header , .trait-impl > .code-header {
632
633
max-width : calc (100% - 41px );
633
634
display : block;
634
635
}
@@ -664,7 +665,7 @@ h2.location a {
664
665
.content td { vertical-align : top; }
665
666
.content td : first-child { padding-right : 20px ; }
666
667
.content td p : first-child { margin-top : 0 ; }
667
- .content td h1 , .content td h2 { margin-left : 0 ; font-size : 1.1 rem ; }
668
+ .content td h1 , .content td h2 { margin-left : 0 ; font-size : 1.125 rem ; }
668
669
.content tr : first-child td { border-top : 0 ; }
669
670
670
671
.docblock table {
@@ -713,7 +714,7 @@ h2.location a {
713
714
.content .fn .where ,
714
715
.content .where .fmt-newline {
715
716
display : block;
716
- font-size : 0.8 rem ;
717
+ font-size : 0.875 rem ;
717
718
}
718
719
719
720
.content .methods > div : not (.notable-traits ): not (.method ) {
@@ -736,7 +737,7 @@ h2.location a {
736
737
}
737
738
738
739
.content .item-info code {
739
- font-size : 0.81 rem ;
740
+ font-size : 0.875 rem ;
740
741
}
741
742
742
743
.content .item-info {
@@ -839,15 +840,6 @@ h2.small-section-header > .anchor {
839
840
text-decoration : underline;
840
841
}
841
842
842
- .invisible > .srclink ,
843
- .method > .code-header + .srclink {
844
- position : absolute;
845
- top : 0 ;
846
- right : 0 ;
847
- font-size : 1.0625rem ;
848
- font-weight : normal;
849
- }
850
-
851
843
.block a .current .crate { font-weight : 500 ; }
852
844
853
845
/* In most contexts we use `overflow-wrap: anywhere` to ensure that we can wrap
@@ -885,7 +877,7 @@ table,
885
877
display : table-cell;
886
878
}
887
879
.item-left {
888
- padding-right : 1.2 rem ;
880
+ padding-right : 1.25 rem ;
889
881
}
890
882
891
883
.search-container {
@@ -907,8 +899,8 @@ table,
907
899
# crate-search {
908
900
min-width : 115px ;
909
901
margin-top : 5px ;
910
- margin-left : 0.2 em ;
911
- padding-left : 0.3 em ;
902
+ margin-left : 0.25 em ;
903
+ padding-left : 0.3125 em ;
912
904
padding-right : 23px ;
913
905
border : 0 ;
914
906
border-radius : 4px ;
@@ -942,7 +934,7 @@ table,
942
934
border : 1px solid;
943
935
border-radius : 2px ;
944
936
padding : 5px 8px ;
945
- font-size : 1.0625 rem ;
937
+ font-size : 1 rem ;
946
938
transition : border-color 300ms ease;
947
939
width : 100% ;
948
940
}
@@ -1054,15 +1046,15 @@ body.blur > :not(#help) {
1054
1046
.stab {
1055
1047
padding : 3px ;
1056
1048
margin-bottom : 5px ;
1057
- font-size : 0.9 rem ;
1049
+ font-size : 0.875 rem ;
1058
1050
font-weight : normal;
1059
1051
}
1060
1052
.stab p {
1061
1053
display : inline;
1062
1054
}
1063
1055
1064
1056
.stab .emoji {
1065
- font-size : 1.2 rem ;
1057
+ font-size : 1.25 rem ;
1066
1058
}
1067
1059
1068
1060
/* Black one-pixel outline around emoji shapes */
@@ -1078,10 +1070,10 @@ body.blur > :not(#help) {
1078
1070
.import-item .stab {
1079
1071
border-radius : 3px ;
1080
1072
display : inline-block;
1081
- font-size : 0.8 rem ;
1073
+ font-size : 0.875 rem ;
1082
1074
line-height : 1.2 ;
1083
1075
margin-bottom : 0 ;
1084
- margin-left : .3 em ;
1076
+ margin-left : 0.3125 em ;
1085
1077
padding : 2px ;
1086
1078
vertical-align : text-bottom;
1087
1079
}
@@ -1107,9 +1099,6 @@ body.blur > :not(#help) {
1107
1099
font-weight : normal;
1108
1100
font-size : 1rem ;
1109
1101
}
1110
- .impl .srclink {
1111
- font-size : 1.0625rem ;
1112
- }
1113
1102
1114
1103
.rightside {
1115
1104
float : right;
@@ -1141,7 +1130,7 @@ a.test-arrow {
1141
1130
position : absolute;
1142
1131
padding : 5px 10px 5px 10px ;
1143
1132
border-radius : 5px ;
1144
- font-size : 1.3 rem ;
1133
+ font-size : 1.375 rem ;
1145
1134
top : 5px ;
1146
1135
right : 5px ;
1147
1136
z-index : 1 ;
@@ -1179,7 +1168,7 @@ a.test-arrow:hover{
1179
1168
1180
1169
h3 .variant {
1181
1170
font-weight : 600 ;
1182
- font-size : 1.1 rem ;
1171
+ font-size : 1.125 rem ;
1183
1172
margin-bottom : 10px ;
1184
1173
border-bottom : none;
1185
1174
}
@@ -1391,7 +1380,7 @@ pre.rust {
1391
1380
left : 0 ;
1392
1381
cursor : pointer;
1393
1382
font-weight : bold;
1394
- font-size : 1.2 rem ;
1383
+ font-size : 1.25 rem ;
1395
1384
border-bottom : 1px solid;
1396
1385
display : flex;
1397
1386
height : 40px ;
@@ -1516,12 +1505,9 @@ kbd {
1516
1505
}
1517
1506
.table-display .out-of-band {
1518
1507
position : relative;
1519
- font-size : 1.1875 rem ;
1508
+ font-size : 1.125 rem ;
1520
1509
display : block;
1521
1510
}
1522
- # implementors-list > .impl-items .table-display .out-of-band {
1523
- font-size : 1.0625rem ;
1524
- }
1525
1511
1526
1512
.table-display td : hover .anchor {
1527
1513
display : block;
@@ -1562,7 +1548,7 @@ div.name.expand + .children {
1562
1548
div .name ::before {
1563
1549
content : "\25B6" ;
1564
1550
padding-left : 4px ;
1565
- font-size : 0.7 rem ;
1551
+ font-size : 0.625 rem ;
1566
1552
position : absolute;
1567
1553
left : -16px ;
1568
1554
top : 4px ;
@@ -1595,8 +1581,8 @@ details.rustdoc-toggle > summary.hideme > span {
1595
1581
details .rustdoc-toggle > summary ::before {
1596
1582
content : "" ;
1597
1583
cursor : pointer;
1598
- width : 17 px ;
1599
- height : max ( 17 px , 1.1 em ) ;
1584
+ width : 16 px ;
1585
+ height : 16 px ;
1600
1586
background-repeat : no-repeat;
1601
1587
background-position : top left;
1602
1588
display : inline-block;
@@ -1643,7 +1629,7 @@ details.rustdoc-toggle > summary.hideme::before {
1643
1629
details .rustdoc-toggle > summary : not (.hideme )::before {
1644
1630
position : absolute;
1645
1631
left : -24px ;
1646
- top : 3 px ;
1632
+ top : 4 px ;
1647
1633
}
1648
1634
1649
1635
.impl-items > details .rustdoc-toggle > summary : not (.hideme )::before {
@@ -1680,8 +1666,8 @@ details.undocumented > summary::before, details.rustdoc-toggle > summary::before
1680
1666
1681
1667
details .rustdoc-toggle [open ] > summary ::before ,
1682
1668
details .rustdoc-toggle [open ] > summary .hideme ::before {
1683
- width : 17 px ;
1684
- height : max ( 17 px , 1.1 em ) ;
1669
+ width : 16 px ;
1670
+ height : 16 px ;
1685
1671
background-repeat : no-repeat;
1686
1672
background-position : top left;
1687
1673
display : inline-block;
@@ -1808,8 +1794,14 @@ details.rustdoc-toggle[open] > summary.hideme::after {
1808
1794
width : 0 ;
1809
1795
}
1810
1796
1797
+ .mobile-topbar .location a {
1798
+ padding : 0 ;
1799
+ margin : 0 ;
1800
+ }
1801
+
1811
1802
.mobile-topbar .location {
1812
1803
border : none;
1804
+ padding : 0 ;
1813
1805
margin : auto 0.5em auto auto;
1814
1806
text-overflow : ellipsis;
1815
1807
overflow : hidden;
@@ -1818,7 +1810,7 @@ details.rustdoc-toggle[open] > summary.hideme::after {
1818
1810
height is specified in pixels, this also has to be specified in
1819
1811
pixels to avoid overflowing the topbar when the user sets a bigger
1820
1812
font size. */
1821
- font-size : 22.4 px ;
1813
+ font-size : 24 px ;
1822
1814
}
1823
1815
1824
1816
.mobile-topbar .logo-container {
0 commit comments