update colors for tutorial

This commit is contained in:
Luke Boswell 2023-03-12 15:42:43 +11:00
parent 0e65f10744
commit 373da8d5e1
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
2 changed files with 44 additions and 57 deletions

View file

@ -741,7 +741,7 @@ List.map ["a", "b", "c"] Foo
These two versions compile to the same thing. As a convenience, Roc lets you specify a tag name where a function is expected; when you do this, the compiler infers that you want a function which uses all of its arguments as the payload to the given tag. These two versions compile to the same thing. As a convenience, Roc lets you specify a tag name where a function is expected; when you do this, the compiler infers that you want a function which uses all of its arguments as the payload to the given tag.
### [`List.any` and `List.all`](#list-any-and-list-all) {#list-any-and-list-all} ### [List.any and List.all](#list-any-and-list-all) {#list-any-and-list-all}
There are several functions that work like `List.map`, they walk through each element of a list and do something with it. Another is `List.any`, which returns `Bool.true` if calling the given function on any element in the list returns `Bool.true`: There are several functions that work like `List.map`, they walk through each element of a list and do something with it. Another is `List.any`, which returns `Bool.true` if calling the given function on any element in the list returns `Bool.true`:

View file

@ -1,48 +1,30 @@
:root { :root {
--base00: #202746; /* WCAG AAA Compliant colors */
--base01: #293256; --code-bg: #f4f8f9;
--base02: #5e6687; --gray: #717171;
--base03: #6b7394; --orange: #BF5000;
--base04: #898ea4; --green: #0B8400;
--base05: #979db4; --cyan: #067C94;
--base06: #dfe2f1; --blue: #05006d;
--base07: #f5f7ff; --magenta: #a20031;
--base08: #c94922;
--base09: #c76b29;
--base0A: #ba862e;
--base0B: #349e99;
--base0C: #219bc1;
--base0D: #3d8fd1;
--base0E: #6679cc;
--base0F: #9c637a;
--red: var(--base08);
--orange: var(--base09);
--yellow: var(--base0A);
--green: var(--base0B);
--cyan: var(--base0C);
--blue: var(--base0D);
--violet: var(--base0E);
--magenta: var(--base0F);
--body-max-width: 900px; --body-max-width: 900px;
--text-color: #121212; --text-color: #121212;
--top-bar-bg: #222; --top-bar-bg: #222;
--top-bar-fg: #eee; --top-bar-fg: #eee;
--top-bar-logo-hover: hsl(258, 73%, 70%); --top-bar-logo-hover: #8055E4;
--header-link-color: #17b9b0; --header-link-color: #107F79;
--header-link-hover: #222; --header-link-hover: #222;
--link-color: hsl(258, 73%, 58%); --link-color: #7546e2;
--h1-color: hsl(258, 73%, 70%); --h1-color: #8055E4;
--repl-prompt: #0064ff; --repl-prompt: #0064ff;
--body-bg: #fff; --body-bg: #fff;
--code-bg: #e7e7e7;
--code-bg-color: var(--base07);
--code-color: #303030; --code-color: #303030;
--toc-background: #f3f3f3; --toc-background: var(--code-bg);
--toc-border: #ddd; --toc-border: var(--gray);
--toc-search-bg: #fcfcfc; --toc-search-bg: #fcfcfc;
--toc-search-border: #bbb; --toc-search-border: var(--gray);
--font-mono: "Source Code Pro", monospace; --font-mono: "Source Code Pro", monospace;
} }
@ -136,7 +118,7 @@ code,
samp { samp {
font-family: var(--font-mono); font-family: var(--font-mono);
color: var(--code-color); color: var(--code-color);
background-color: var(--code-bg-color); background-color: var(--code-bg);
display: inline-block; display: inline-block;
} }
@ -167,7 +149,7 @@ pre {
padding: 8px 16px; padding: 8px 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 8px; border-radius: 8px;
background-color: var(--code-bg-color); background-color: var(--code-bg);
overflow-x: auto; overflow-x: auto;
font-size: 1.2rem; font-size: 1.2rem;
line-height: 1.76em; line-height: 1.76em;
@ -181,7 +163,7 @@ pre {
} }
.repl-err { .repl-err {
color: #c20000; color: var(--magenta);
} }
/* Tables */ /* Tables */
@ -230,15 +212,6 @@ td:last-child {
text-align: left; text-align: left;
} }
@media (prefers-color-scheme: dark) {
table,
tr,
th,
td {
border-color: #3b3f47;
}
}
/* Tutorial Specific */ /* Tutorial Specific */
#tutorial-start { #tutorial-start {
@ -252,7 +225,7 @@ td:last-child {
#tutorial-toc { #tutorial-toc {
margin-top: 18px; margin-top: 18px;
background: var(--code-bg-color); background: var(--code-bg);
border-radius: 8px; border-radius: 8px;
padding: 12px 24px; padding: 12px 24px;
margin-left: 64px; margin-left: 64px;
@ -274,7 +247,6 @@ td:last-child {
} }
#tutorial-toc h2 { #tutorial-toc h2 {
color: #686868;
font-family: inherit; font-family: inherit;
font-size: 2em; font-size: 2em;
text-shadow: none; text-shadow: none;
@ -613,21 +585,29 @@ h4 {
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
/* WCAG AAA Compliant colors */
--code-bg: #202746;
--gray: #b6b6b6;
--orange: #fd6e08;
--green: #8ecc88;
--cyan: #12c9be;
--blue: #b1afdf;
--magenta: #f39bac;
--text-color: #cdcdcd; --text-color: #cdcdcd;
--top-bar-bg: #2a2a2a; --top-bar-bg: #2a2a2a;
--header-link-color: hsl(258, 73%, 70%); --header-link-color: #9C7CEA;
--header-link-hover: #ddd; --header-link-hover: #ddd;
--h1-color: #1bc6bd; --h1-color: #1bc6bd;
--link-color: #1bc6bd; --link-color: #1bc6bd;
--repl-prompt: var(--link-color); --repl-prompt: #1bc6bd;
--body-bg: #0e0e0f; --body-bg: #0e0e0f;
--code-bg-color: #222947;
--code-snippet-border: #444; --code-snippet-border: #444;
--code-color: #cdcdcd; --code-color: #cdcdcd;
--toc-background: var(--code-bg-color); --toc-background: var(--code-bg);
--toc-border: var(--code-snippet-border); --toc-border: var(--code-snippet-border);
--toc-search-bg: #333; --toc-search-bg: #333;
--toc-search-border: #555; --toc-search-border: var(--gray);
} }
h1, h1,
@ -641,12 +621,19 @@ h4 {
html { html {
scrollbar-color: #444444 #2f2f2f; scrollbar-color: #444444 #2f2f2f;
} }
table,
tr,
th,
td {
border-color: var(--gray);
}
} }
/* Comments `#` and Documentation comments `##` */ /* Comments `#` and Documentation comments `##` */
samp .comment, samp .comment,
code .comment { code .comment {
color: #338545; color: var(--green);
} }
/* Number, String, Tag, Type literals */ /* Number, String, Tag, Type literals */
samp .literal, samp .literal,
@ -667,13 +654,13 @@ code .op {
/* Delimieters */ /* Delimieters */
samp .delimeter, samp .delimeter,
code .delimeter { code .delimeter {
color: var(--base05); color: var(--gray);
} }
/* Variables modules and field names */ /* Variables modules and field names */
samp .lowerident, samp .lowerident,
code .lowerident { code .lowerident {
color: var(--violet); color: var(--blue);
} }
/* Types, Tags, and Modules */ /* Types, Tags, and Modules */