diff options
Diffstat (limited to 'www/assets/style.css')
-rw-r--r-- | www/assets/style.css | 213 |
1 files changed, 213 insertions, 0 deletions
diff --git a/www/assets/style.css b/www/assets/style.css new file mode 100644 index 0000000..2752323 --- /dev/null +++ b/www/assets/style.css | |||
@@ -0,0 +1,213 @@ | |||
1 | header { | ||
2 | display: flex; | ||
3 | justify-content: space-between; | ||
4 | margin-top: 1rem; | ||
5 | } | ||
6 | |||
7 | footer * { | ||
8 | display: inline; | ||
9 | } | ||
10 | |||
11 | blockquote { | ||
12 | color: gray; | ||
13 | font-size: 1.2rem; | ||
14 | font-style: italic; | ||
15 | |||
16 | text-align: center; | ||
17 | } | ||
18 | |||
19 | p code { | ||
20 | margin-inline: 0.2rem; | ||
21 | padding-inline: 6px; | ||
22 | } | ||
23 | |||
24 | /* Neat CSS: https://neat.joeldare.com */ | ||
25 | * { | ||
26 | box-sizing: border-box; | ||
27 | } | ||
28 | |||
29 | :root { | ||
30 | color-scheme: light dark; | ||
31 | --light: #fff; | ||
32 | /* --light: #f7f7f7; */ | ||
33 | --lesslight: #efefef; | ||
34 | --dark: #404040; | ||
35 | --moredark: #000; | ||
36 | /*--link: royalblue; */ | ||
37 | --link: #850000; | ||
38 | --link-highlight-color: #ffdcda; | ||
39 | /* border-top: 5px solid var(--dark); */ | ||
40 | line-height: 1.5em; | ||
41 | font-family: system-ui, sans-serif; | ||
42 | font-size: 16px; | ||
43 | color: var(--dark); | ||
44 | } | ||
45 | |||
46 | h1 { | ||
47 | line-height: 1em; | ||
48 | } | ||
49 | |||
50 | button, input { | ||
51 | font-size: 1em; /* Override browser default font shrinking*/ | ||
52 | } | ||
53 | |||
54 | input { | ||
55 | border: 1px solid var(--dark); | ||
56 | background-color: var(--lesslight); | ||
57 | border-radius: .25em; | ||
58 | padding: .5em; | ||
59 | } | ||
60 | |||
61 | pre { | ||
62 | background-color: var(--lesslight); | ||
63 | margin: 0.5em 0 0.5em 0; | ||
64 | padding: 0.5em; | ||
65 | overflow: auto; | ||
66 | } | ||
67 | |||
68 | code { | ||
69 | background-color: var(--lesslight); | ||
70 | } | ||
71 | |||
72 | body { | ||
73 | background-color: var(--light); | ||
74 | margin: 0; | ||
75 | max-width: 800px; | ||
76 | padding: 0 20px 20px 20px; | ||
77 | margin-left: auto; | ||
78 | margin-right: auto; | ||
79 | } | ||
80 | |||
81 | a { | ||
82 | outline: none; | ||
83 | text-decoration: underline 2px var(--link-highlight-color); | ||
84 | color: var(--link); | ||
85 | } | ||
86 | |||
87 | a:hover { | ||
88 | background: var(--link-highlight-color); | ||
89 | } | ||
90 | |||
91 | img { | ||
92 | max-width: 100%; | ||
93 | height: auto; | ||
94 | } | ||
95 | |||
96 | button, .button, input[type=submit] { | ||
97 | display: inline-block; | ||
98 | background-color: var(--dark); | ||
99 | color: var(--light); | ||
100 | text-align: center; | ||
101 | padding: .5em; | ||
102 | border-radius: .25em; | ||
103 | text-decoration: none; | ||
104 | border: none; | ||
105 | cursor: pointer; | ||
106 | } | ||
107 | |||
108 | button:hover, .button:hover, input[type=submit]:hover { | ||
109 | color: var(--lesslight); | ||
110 | background-color: var(--moredark); | ||
111 | } | ||
112 | |||
113 | /* Add a margin between side-by-side buttons */ | ||
114 | button + button, .button + .button, input[type=submit] + input[type=submit] { | ||
115 | margin-left: 1em; | ||
116 | } | ||
117 | |||
118 | .center { | ||
119 | display: block; | ||
120 | margin-left: auto; | ||
121 | margin-right: auto; | ||
122 | text-align: center; | ||
123 | } | ||
124 | |||
125 | .bordered { | ||
126 | border: 3px solid; | ||
127 | } | ||
128 | |||
129 | .home { | ||
130 | display: inline-block; | ||
131 | background-color: var(--dark); | ||
132 | color: var(--light); | ||
133 | margin-top: 20px; | ||
134 | padding: 5px 10px 5px 10px; | ||
135 | text-decoration: none; | ||
136 | font-weight: bold; | ||
137 | } | ||
138 | |||
139 | |||
140 | /* Desktop sizes */ | ||
141 | @media (min-width: 600px) { | ||
142 | ol.twocol { | ||
143 | column-count: 2; | ||
144 | } | ||
145 | |||
146 | .row { | ||
147 | display: flex; | ||
148 | flex-direction: row; | ||
149 | padding: 0; | ||
150 | width: 100%; | ||
151 | } | ||
152 | |||
153 | /* Make everything in a row a column */ | ||
154 | .row > * { | ||
155 | display: block; | ||
156 | flex: 1 1 auto; | ||
157 | max-width: 100%; | ||
158 | width: 100%; | ||
159 | } | ||
160 | |||
161 | .row > *:not(:last-child) { | ||
162 | margin-right: 10px; | ||
163 | } | ||
164 | } | ||
165 | |||
166 | /* Dark mode overrides (confusingly inverse) */ | ||
167 | @media (prefers-color-scheme: dark) { | ||
168 | :root { | ||
169 | --light: #222; | ||
170 | --lesslight: #333; | ||
171 | --dark: #eee; | ||
172 | --moredark: #fefefe; | ||
173 | } | ||
174 | /* This fixes an odd blue then white shadow on FF in dark mode */ | ||
175 | *:focus { | ||
176 | outline: var(--light); | ||
177 | box-shadow: 0 0 0 .25em var(--link); | ||
178 | } | ||
179 | } | ||
180 | |||
181 | /* Printing */ | ||
182 | @media print { | ||
183 | .home { | ||
184 | display: none; | ||
185 | } | ||
186 | } | ||
187 | |||
188 | [data-tooltip]{ | ||
189 | display: inline-block; | ||
190 | position: relative; | ||
191 | |||
192 | &::after { | ||
193 | display: block; | ||
194 | position: absolute; | ||
195 | content: attr(data-tooltip); | ||
196 | background: var(--dark); | ||
197 | color: var(--lesslight); | ||
198 | padding: .25em; | ||
199 | cursor: default; | ||
200 | user-select: text; | ||
201 | |||
202 | transition: | ||
203 | visibility .3s ease-out, | ||
204 | opacity .3s ease-out; | ||
205 | visibility: hidden; | ||
206 | opacity: 0; | ||
207 | } | ||
208 | |||
209 | &:hover::after { | ||
210 | opacity: 1; | ||
211 | visibility: visible; | ||
212 | } | ||
213 | } | ||