Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
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
export const ofStyle = `:root {
--main-bg-color: #faf7f4;
--active-bg-color: #f0ede9;
--main-text-color: #333;
--hover-text-color: #111;
--secondary-text-color: #888;
}
@media (prefers-color-scheme: dark) {
:root {
--main-bg-color: #2e2e2e;
--active-bg-color: #444;
--main-text-color: #eee;
--secondary-text-color: #888;
--hover-text-color: #fff;
}
}
body {
font-family: "IBM Plex Mono", sans-serif;
font-size: 13px;
background: var(--main-bg-color);
line-height: 1.4;
color: var(--main-text-color);
}
.recipe {
text-decoration: none;
display: block;
padding: 15px;
border-radius: 5px;
color: var(--main-text-color);
transition: 400ms background-color;
}
.recipe name {
display: flex;
align-items: center;
gap: 4px;
padding-bottom: 5px;
font-weight: normal;
text-decoration: underline;
font-style: italic;
}
.recipe.active {
background-color: var(--active-bg-color);
}
.missing {
text-decoration: line-through;
color: var(--secondary-text-color);
}
[itemprop="recipeIngredient"] .missing-trigger {
display: none;
}
[itemprop="recipeIngredient"]:hover .missing-trigger {
display: inline-flex;
align-items: center;
gap: 5px;
padding-left: 10px;
}
button {
padding: 1px 10px;
font-size: 10px;
border: none;
background: var(--active-bg-color);
font-family: inherit;
border-radius: 2px;
}
button:hover {
box-shadow: 0 0 0 1px var(--hover-text-color);
}
.recipe:hover {
color: var(--hover-text-color);
}
ul.ingredients {
margin: 0;
padding: 10px 0 10px 20px;
list-style-type: "- ";
}
ul.ingredients li {
padding: 4px 0;
}
form {
padding: 0;
margin: 0;
}
summary {
list-style-type: "+";
padding: 2px;
November 16, 2023