1
1
: root {
2
2
/* WCAG AAA Compliant colors */
3
+ --code-bg : # f4f8f9 ;
3
4
--gray-bg : # f4f8f9 ;
4
5
--gray : # 717171 ;
5
6
--orange : # bf5000 ;
33
34
--font-size-normal : 18px ;
34
35
--body-max-width : 1024px ;
35
36
--dark-code-bg : # 202746 ;
37
+
38
+ /* Tutorial */
39
+ --header-link-color : # 107F79 ;
40
+ --header-link-hover : # 222 ;
41
+ --h1-color : # 8055E4 ;
36
42
}
37
43
38
44
html {
217
223
color : var (--heading-color );
218
224
}
219
225
220
- .article-layout main {
226
+ .article-layout main , . article-layout pre {
221
227
max-width : 720px ;
222
228
}
223
229
@@ -360,27 +366,27 @@ pre > code {
360
366
display : none !important ;
361
367
}
362
368
363
- # repl-container {
369
+ # homepage- repl-container {
364
370
display : flex;
365
371
flex-direction : row-reverse;
366
372
}
367
373
368
- # repl-container # repl-description {
374
+ # homepage- repl-container # repl-description {
369
375
padding : 0 30px ;
370
376
margin-top : 2px ;
371
377
flex : 1 ;
372
378
}
373
379
374
- # repl-container # repl-description a {
380
+ # homepage- repl-container # repl-description a {
375
381
color : inherit;
376
382
text-decoration : underline;
377
383
}
378
384
379
- # repl-container # repl-description a : hover {
385
+ # homepage- repl-container # repl-description a : hover {
380
386
color : var (--primary-1 );
381
387
}
382
388
383
- # repl-container # repl {
389
+ # homepage- repl-container # repl {
384
390
flex : 1 ;
385
391
border : 2px solid # 444 ;
386
392
font-size : var (--font-size-normal );
@@ -389,24 +395,24 @@ pre > code {
389
395
max-width : 50% ;
390
396
}
391
397
392
- # repl-container # repl ,
393
- # repl-container # repl code {
398
+ # homepage- repl-container # repl ,
399
+ # homepage- repl-container # repl code {
394
400
color : white;
395
401
background-color : var (--dark-code-bg );
396
402
}
397
403
398
- # repl-container # source-input {
404
+ # homepage- repl-container # source-input {
399
405
margin-bottom : 0 ;
400
406
margin-top : 6px ;
401
407
font-size : var (--font-size-normal );
402
408
height : 57px ;
403
409
}
404
410
405
- # repl-container p {
411
+ # homepage- repl-container p {
406
412
position : relative; /* Needed for the repl arrow's position: absolute */
407
413
}
408
414
409
- # repl-container # repl-arrow {
415
+ # homepage- repl-container # repl-arrow {
410
416
cursor : default;
411
417
font-weight : bold;
412
418
font-size : 48px ;
@@ -527,6 +533,10 @@ li {
527
533
--body-max-width : none;
528
534
}
529
535
536
+ # tutorial-main main {
537
+ max-width : none;
538
+ }
539
+
530
540
# homepage-logo {
531
541
/* The bird runs off the screen unless we shrink it */
532
542
height : 80px ;
637
647
h5 {
638
648
line-height : 1.2em !important ;
639
649
font-size : 2rem !important ;
650
+ width : auto;
640
651
}
641
652
642
653
# top-bar-links {
666
677
margin : 0 ;
667
678
}
668
679
669
- # repl-container # repl {
680
+ # homepage- repl-container # repl {
670
681
max-width : none;
671
682
}
672
683
}
@@ -685,6 +696,19 @@ li {
685
696
}
686
697
}
687
698
699
+
700
+ @font-face {
701
+ font-family : "Permanent Marker" ;
702
+ font-style : normal;
703
+ font-weight : 400 ;
704
+ font-display : swap;
705
+ src : url ("/fonts/permanent-marker-v16-latin/permanent-marker-v16-latin-regular.woff2" ) format ("woff2" ),
706
+ url ("/fonts/permanent-marker-v16-latin/permanent-marker-v16-latin-regular.woff" ) format ("woff" );
707
+ unicode-range : U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
708
+ U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
709
+ U+2215, U+FEFF, U+FFFD;
710
+ }
711
+
688
712
/* latin-ext */
689
713
@font-face {
690
714
font-family : "Lato" ;
745
769
@media (prefers-color-scheme : dark) {
746
770
: root {
747
771
/* WCAG AAA Compliant colors */
748
- /* WCAG AAA Compliant colors */
772
+ --code-bg : # 202746 ;
749
773
--gray-bg : # 202746 ;
750
774
--gray : # b6b6b6 ;
751
775
--orange : # fd6e08 ;
@@ -765,6 +789,11 @@ li {
765
789
--faded-color : # bbbbbb ;
766
790
--gray : # 6e6e6e ;
767
791
--heading-color : # eee ;
792
+
793
+ /* Tutorial */
794
+ --header-link-color : # 9C7CEA ;
795
+ --header-link-hover : # ddd ;
796
+ --h1-color : # 1bc6bd ;
768
797
}
769
798
770
799
.logo-dark {
807
836
}
808
837
809
838
# first-code-sample ,
810
- # repl-container # repl {
839
+ # homepage- repl-container # repl {
811
840
border : 1px solid # ddd ;
812
841
}
813
842
@@ -1100,10 +1129,85 @@ code .dim {
1100
1129
border-color : var (--light-cyan );
1101
1130
}
1102
1131
1103
- /* Tutorial Table of Contents */
1132
+ /* Tutorial */
1133
+
1134
+ # tutorial-main main {
1135
+ display : flex;
1136
+ flex-direction : row-reverse;
1137
+ max-width : 1024px ;
1138
+ }
1139
+
1140
+ # tutorial-main h1 ,
1141
+ # tutorial-main h2 ,
1142
+ # tutorial-main h3 ,
1143
+ # tutorial-main h4 ,
1144
+ # tutorial-main h5 {
1145
+ font-family : "Permanent Marker" ;
1146
+ line-height : 1rem ;
1147
+ margin-top : 1.75rem ;
1148
+ margin-bottom : 0 ;
1149
+ border : none;
1150
+ }
1151
+
1152
+ # tutorial-main h1 a ,
1153
+ # tutorial-main h2 a ,
1154
+ # tutorial-main h3 a ,
1155
+ # tutorial-main h4 a ,
1156
+ # tutorial-main h5 a {
1157
+ color : var (--header-link-color );
1158
+ }
1159
+
1160
+ # tutorial-main h1 a : hover ,
1161
+ # tutorial-main h2 a : hover ,
1162
+ # tutorial-main h3 a : hover ,
1163
+ # tutorial-main h4 a : hover ,
1164
+ # tutorial-main h5 a : hover {
1165
+ text-decoration : none;
1166
+ color : var (--header-link-hover );
1167
+ }
1168
+
1169
+ # tutorial-main h1 {
1170
+ font-size : 7rem ;
1171
+ line-height : 7rem ;
1172
+ color : var (--h1-color );
1173
+ margin-top : 24px ;
1174
+ margin-bottom : 1.75rem ;
1175
+ text-shadow : 1px 1px 1px # 010101 ;
1176
+ }
1177
+
1178
+ # tutorial-main h2 {
1179
+ font-size : 4rem ;
1180
+ line-height : 4rem ;
1181
+ text-shadow : 1px 1px 1px # 010101 ;
1182
+ padding : 0.8rem 0 ;
1183
+ margin-top : 2.5rem ;
1184
+ width : 60rem ; /* Without this, "Building an application" wraps and looks awkward */
1185
+ }
1186
+
1187
+ # tutorial-main h3 {
1188
+ font-size : 3rem ;
1189
+ line-height : 3rem ;
1190
+ text-shadow : 1px 1px 1px # 010101 ;
1191
+ margin-bottom : 0.5rem ;
1192
+ }
1193
+
1194
+ # tutorial-main h4 {
1195
+ font-size : 2rem ;
1196
+ text-shadow : 1px 1px 1px # 010101 ;
1197
+ }
1198
+
1199
+ # tutorial-body , # tutorial-body pre {
1200
+ max-width : 646px ;
1201
+ }
1104
1202
1105
1203
# tutorial-toc {
1106
1204
background-color : var (--gray-bg );
1205
+ flex : 0 0 auto; /* Take up as much space as it needs */
1206
+ margin-top : 30px ;
1207
+ background : var (--code-bg );
1208
+ padding : 12px 24px ;
1209
+ margin-left : 64px ;
1210
+ align-self : flex-start; /* Aligns to the start, not stretching in height */
1107
1211
}
1108
1212
1109
1213
# tutorial-toc > ul {
@@ -1122,6 +1226,62 @@ code .dim {
1122
1226
text-overflow : ellipsis; /* Adds an ellipsis if the content overflows */
1123
1227
}
1124
1228
1229
+ # tutorial-toc code {
1230
+ background : none;
1231
+ color : inherit;
1232
+ margin : 0 ;
1233
+ padding : 0 ;
1234
+ }
1235
+
1236
+ # tutorial-toc ol {
1237
+ padding : 3px ;
1238
+ margin : 8px 0 ;
1239
+ list-style : none;
1240
+ padding-bottom : 0 ;
1241
+ margin-bottom : 0 ;
1242
+ }
1243
+
1244
+ # tutorial-toc h2 {
1245
+ font-family : inherit;
1246
+ font-size : 2em ;
1247
+ text-shadow : none;
1248
+ margin : 0 ;
1249
+ padding : 16px 0 ;
1250
+ }
1251
+
1252
+ # toc-search {
1253
+ background-color : var (--toc-search-bg );
1254
+ border : 1px solid var (--toc-search-border );
1255
+ color : inherit;
1256
+ padding : 6px 8px ;
1257
+ margin-top : 16px ;
1258
+ margin-bottom : 4px ;
1259
+ box-sizing : border-box;
1260
+ width : 100% ;
1261
+ font-size : inherit;
1262
+ }
1263
+
1264
+ # tutorial-toc-toggle ,
1265
+ # tutorial-toc-toggle-label ,
1266
+ # close-tutorial-toc {
1267
+ display : none;
1268
+ /* This may be overridden on mobile-friendly screen widths */
1269
+ }
1270
+
1271
+ # tutorial-toc-toggle ,
1272
+ # tutorial-toc-toggle-label {
1273
+ font-size : 1.1rem ;
1274
+ float : right;
1275
+ }
1276
+
1277
+ # close-tutorial-toc {
1278
+ position : absolute;
1279
+ top : 20px ;
1280
+ right : 8px ;
1281
+ font-size : 18px ;
1282
+ padding : 12px 24px ;
1283
+ }
1284
+
1125
1285
/* for larger screens */
1126
1286
@media only screen and (min-width : 768px ) {
1127
1287
# tutorial-toc > ul > li {
0 commit comments