Public
Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// tuna-based generative css lib
import clsx from "https://esm.sh/clsx";
import iAWriterMono from "https://esm.town/v/jxnblk/iAWriterMono";
export const colors = [
"light",
"foliage",
"paper",
"amber",
"tomato",
"brown reverse",
"dark reverse",
"black reverse",
];
// gaps 7*32 = 224
// padding 64
// columns 8*96 = 768
// columns @ 80 = 640
const vars = `
:root {
--text: #000;
--background: #fff;
--primary: #4c4cb1;
--greeble: #bbb;
}
/* color modes */
.light { --text: #000; --background: #fff; --greeble: #bbb; }
/** TODO */
.bright { --text: #000; --background: #fff; --greeble: #fda900; }
.foliage { --text: #3a6c0b; --background: #f0f4ec; --greeble: #a2c185; --primary: #5f8e33; }
.paper { --text: #4d4019; --background: #faefd0; --greeble: #ccc09d; --primary: #8e5200; }
.amber { --text: #422c00; --background: #e5b656; --greeble: #c3a058; --primary: #541c00; }
.tomato { --text: #32221b; --background: #ee976a; --greeble: #f05200; --primary: #003c5b; }
.brown { --text: #dab9a8; --background: #422d23; --greeble: #634f44; --primary: #0cf }
.dark { --text: #eee; --background: #222; --greeble: #666; --primary: #0cf }
.black { --text: #fff; --background: #000; --greeble: #333; --primary: #0cf }
body {
--primary-3: color-mix(in srgb, var(--primary) 50%, var(--background));
--primary-2: color-mix(in srgb, var(--primary) 25%, var(--background));
--primary-1: color-mix(in srgb, var(--primary) 12%, var(--background));
--primary-0: color-mix(in srgb, var(--primary) 6%, var(--background));
--primary-dark: color-mix(in srgb, var(--primary) 50%, var(--text));
--highlight: #b1e5e5;
--highlight-5: color-mix(in srgb, var(--highlight) 50%, var(--background));
--highlight-2: color-mix(in srgb, var(--highlight) 25%, var(--background));
--highlight-1: color-mix(in srgb, var(--highlight) 12%, var(--background));
--highlight-0: color-mix(in srgb, var(--highlight) 6%, var(--background));
--highlight-dark: color-mix(in srgb, var(--highlight) 50%, var(--text));
--greeble: var(--highlight);
}
`;
const typography = `/** css */
* { box-sizing: border-box }
body {
margin: 0;
font-family: 'iA Writer Mono', Menlo, ui-monospace, monospace;
font-size: 16px;
line-height: 32px;
color: var(--text);
background-color: var(--background);
transition: background-color 0.2s ease-in-out;
}
img {
max-width: 100%;
height: auto;
}
h1, h2, h3, h4, h5 {
font-size: 16px; margin: 0;
}
h6, .h6 { font-size: 12px; margin: 0; }
h3, h4, h5, .h3, .h4, .h5 { margin-top: 32px; margin-bottom: 32px; }
p, ul, ol, blockquote {
margin-top: 0;
margin-bottom: 32px;
}
.bold { font-weight: bold }
.normal { font-weight: normal; }
.caps {
text-transform: uppercase;
letter-spacing: 0.125em;
}
a {
color: var(--primary);
text-decoration-color: var(--primary-2);
transition-property: color, background-color, opacity;
transition-duration: 0.3s;
transition-timing-function: ease-in-out;
}
a:hover {
color: var(--primary);
background-color: var(--primary-0);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
August 15, 2024