Skip to content

Commit 9e7598d

Browse files
committed
Update site.css to latest
1 parent 9cf46f3 commit 9e7598d

File tree

1 file changed

+175
-15
lines changed

1 file changed

+175
-15
lines changed

www/public/site.css

+175-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
:root {
22
/* WCAG AAA Compliant colors */
3+
--code-bg: #f4f8f9;
34
--gray-bg: #f4f8f9;
45
--gray: #717171;
56
--orange: #bf5000;
@@ -33,6 +34,11 @@
3334
--font-size-normal: 18px;
3435
--body-max-width: 1024px;
3536
--dark-code-bg: #202746;
37+
38+
/* Tutorial */
39+
--header-link-color: #107F79;
40+
--header-link-hover: #222;
41+
--h1-color: #8055E4;
3642
}
3743

3844
html {
@@ -217,7 +223,7 @@ h2 {
217223
color: var(--heading-color);
218224
}
219225

220-
.article-layout main {
226+
.article-layout main, .article-layout pre {
221227
max-width: 720px;
222228
}
223229

@@ -360,27 +366,27 @@ pre > code {
360366
display: none !important;
361367
}
362368

363-
#repl-container {
369+
#homepage-repl-container {
364370
display: flex;
365371
flex-direction: row-reverse;
366372
}
367373

368-
#repl-container #repl-description {
374+
#homepage-repl-container #repl-description {
369375
padding: 0 30px;
370376
margin-top: 2px;
371377
flex: 1;
372378
}
373379

374-
#repl-container #repl-description a {
380+
#homepage-repl-container #repl-description a {
375381
color: inherit;
376382
text-decoration: underline;
377383
}
378384

379-
#repl-container #repl-description a:hover {
385+
#homepage-repl-container #repl-description a:hover {
380386
color: var(--primary-1);
381387
}
382388

383-
#repl-container #repl {
389+
#homepage-repl-container #repl {
384390
flex: 1;
385391
border: 2px solid #444;
386392
font-size: var(--font-size-normal);
@@ -389,24 +395,24 @@ pre > code {
389395
max-width: 50%;
390396
}
391397

392-
#repl-container #repl,
393-
#repl-container #repl code {
398+
#homepage-repl-container #repl,
399+
#homepage-repl-container #repl code {
394400
color: white;
395401
background-color: var(--dark-code-bg);
396402
}
397403

398-
#repl-container #source-input {
404+
#homepage-repl-container #source-input {
399405
margin-bottom: 0;
400406
margin-top: 6px;
401407
font-size: var(--font-size-normal);
402408
height: 57px;
403409
}
404410

405-
#repl-container p {
411+
#homepage-repl-container p {
406412
position: relative; /* Needed for the repl arrow's position: absolute */
407413
}
408414

409-
#repl-container #repl-arrow {
415+
#homepage-repl-container #repl-arrow {
410416
cursor: default;
411417
font-weight: bold;
412418
font-size: 48px;
@@ -527,6 +533,10 @@ li {
527533
--body-max-width: none;
528534
}
529535

536+
#tutorial-main main {
537+
max-width: none;
538+
}
539+
530540
#homepage-logo {
531541
/* The bird runs off the screen unless we shrink it */
532542
height: 80px;
@@ -637,6 +647,7 @@ li {
637647
h5 {
638648
line-height: 1.2em !important;
639649
font-size: 2rem !important;
650+
width: auto;
640651
}
641652

642653
#top-bar-links {
@@ -666,7 +677,7 @@ li {
666677
margin: 0;
667678
}
668679

669-
#repl-container #repl {
680+
#homepage-repl-container #repl {
670681
max-width: none;
671682
}
672683
}
@@ -685,6 +696,19 @@ li {
685696
}
686697
}
687698

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+
688712
/* latin-ext */
689713
@font-face {
690714
font-family: "Lato";
@@ -745,7 +769,7 @@ li {
745769
@media (prefers-color-scheme: dark) {
746770
:root {
747771
/* WCAG AAA Compliant colors */
748-
/* WCAG AAA Compliant colors */
772+
--code-bg: #202746;
749773
--gray-bg: #202746;
750774
--gray: #b6b6b6;
751775
--orange: #fd6e08;
@@ -765,6 +789,11 @@ li {
765789
--faded-color: #bbbbbb;
766790
--gray: #6e6e6e;
767791
--heading-color: #eee;
792+
793+
/* Tutorial */
794+
--header-link-color: #9C7CEA;
795+
--header-link-hover: #ddd;
796+
--h1-color: #1bc6bd;
768797
}
769798

770799
.logo-dark {
@@ -807,7 +836,7 @@ li {
807836
}
808837

809838
#first-code-sample,
810-
#repl-container #repl {
839+
#homepage-repl-container #repl {
811840
border: 1px solid #ddd;
812841
}
813842

@@ -1100,10 +1129,85 @@ code .dim {
11001129
border-color: var(--light-cyan);
11011130
}
11021131

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+
}
11041202

11051203
#tutorial-toc {
11061204
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 */
11071211
}
11081212

11091213
#tutorial-toc > ul {
@@ -1122,6 +1226,62 @@ code .dim {
11221226
text-overflow: ellipsis; /* Adds an ellipsis if the content overflows */
11231227
}
11241228

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+
11251285
/* for larger screens */
11261286
@media only screen and (min-width: 768px) {
11271287
#tutorial-toc > ul > li {

0 commit comments

Comments
 (0)