theme.css
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/* Colors */ :root { --site-link-color: black; --site-link-color-hover: orange; --link-color: blue; --link-color-hover: orange; --button-border-color: black; --button-border-radius: 4px; --button-padding: 8px; --code-background-color: black; --code-border-color: white; --code-border-radius: 4px; --code-color: white; --code-margin: 2px; --code-padding: 2px; --code-block-padding: 8px; --block-element-max-height: 20vh; } /* Resets */ html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, pre { margin: 0; padding: 0; } html { font-family: sans-serif; line-height: 1.5; } input[type="button"], input[type="submit"], button { background: none; border: none; padding: 0; } /* Good baseline for block element vertical margins */ h1, h2, h3, h4, h5, h6, p, ul, ol, pre { margin: 1rem 0; } /* List items should be indented a little bit so the bullets don't stick out awkwardly */ li { margin-left: 2rem; } /* Keep the header and footer static, and let the content fill the rest of the space so we are * always at least 1 browser window high */ body { display: flex; flex-direction: column; margin: 0 1rem; min-height: 100vh; } #site-header { flex: 0 0 auto; } main { flex: 1; } #site-footer { flex: 0 0 auto; } /* Sitewide colors */ a { color: var(--link-color); transition: color 0.3s; } a:visited { color: var(--link-color); } a:hover { color: var(--link-color-hover); } /* Code elements get a special border and colors to stand out */ code { background-color: var(--code-background-color); border: 1px solid var(--code-border-color); border-radius: var(--code-border-radius); color: var(--code-color); padding: var(--code-padding); margin: var(--code-margin); } a code, pre code { border: none; } a code { color: inherit; } pre { background-color: var(--code-background-color); border: 1px solid var(--code-border-color); border-radius: var(--code-border-radius); color: var(--code-color); max-height: var(--block-element-max-height); overflow: auto; padding: var(--code-block-padding); } /* Site header */ #site-header { margin: 1rem 0; padding-bottom: 0.5rem; } #site-link { padding-bottom: 0.5rem; text-align: center; } #site-link a { color: var(--site-link-color); font-size: 2rem; font-weight: bold; text-decoration: none; } #site-link a:visited { color: var(--site-link-color); } #site-link a:hover { color: var(--site-link-color-hover); } #site-menu ul { display: flex; flex-direction: row; justify-content: center; list-style-type: none; } #site-menu li { flex: 0 0 auto; margin: 0 1rem; } #site-menu a { border-radius: var(--button-border-radius); display: inline-block; font-size: 1.25rem; padding: var(--button-padding); text-align: center; width: 75px; } /* Site footer */ #site-footer { font-size: 0.75rem; margin: 2rem; text-align: center; } /* Add margins to the main content area past a certain screen size (over 1024px is typical for * desktop) */ main { width: 100%; margin: 0 auto; } @media screen and (min-width: 1025px) { main { width: 1024px; } } /* Don't explode big images to their full size; let them take up most of the content area * horizontally, but only 1/5 of the screen vertically */ article img { max-width: 90%; max-height: var(--block-element-max-height); }