forked from OurHike/OurHike
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.css
More file actions
354 lines (346 loc) · 10.4 KB
/
Copy pathsettings.css
File metadata and controls
354 lines (346 loc) · 10.4 KB
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
.settings {
display: flex;
flex-direction: column;
gap: var(--space-5, 20px);
padding: var(--space-5, 20px);
background: var(--bg-page);
}
.settings__group {
display: flex;
flex-direction: column;
gap: var(--space-2, 8px);
}
.settings__heading {
margin: 0;
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--fg-3);
}
.settings__row {
display: flex;
align-items: center;
gap: var(--space-2, 8px);
min-height: var(--min-touch-target, 44px);
margin: 0;
padding: 0 var(--space-3, 12px);
background: var(--bg-surface);
border: 1px solid var(--border-1);
border-radius: 10px;
font-size: 14px;
}
.settings__row--later {
opacity: 0.55;
}
.settings__label {
flex: 1;
color: var(--fg-1);
}
.settings__value {
color: var(--fg-2);
font-size: 13px;
}
/* A commit hash, and the reason it is not in the body face: this is a string
somebody reads off a screen and types somewhere else, so 0/O and 1/l have to
be told apart. `user-select: all` makes one tap select the whole hash on the
phones where the copy button cannot work. */
.settings__value--code {
font-family: var(--font-mono, ui-monospace, monospace);
user-select: all;
}
.settings__later {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--fg-3);
border: 1px solid var(--border-2);
border-radius: 4px;
padding: 1px 4px;
}
.settings__note {
margin: 0;
font-size: 12px;
color: var(--fg-3);
}
.settings__locked {
margin: 0;
padding: var(--space-3, 12px);
font-size: 13px;
color: var(--danger);
background: color-mix(in srgb, var(--danger) 8%, transparent);
border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
border-radius: 10px;
}
.settings__action {
min-height: var(--min-touch-target, 44px);
padding: 0 var(--space-4, 16px);
font-size: 14px;
font-weight: 600;
color: var(--fg-1);
background: var(--bg-surface);
border: 1px solid var(--border-2);
border-radius: 10px;
cursor: pointer;
}
.settings__exports {
display: flex;
gap: var(--space-2, 8px);
}
/* ---------- Report a bug (ReportBug.tsx) ---------- */
/* Stacked rather than a row of four: these carry a hint each, and the hint is
what stops a trail condition being filed as a bug. Two of them side by side
on a phone would be the first thing to get truncated. */
.settings__links {
display: flex;
flex-direction: column;
gap: var(--space-2, 8px);
}
/* Deliberately the label-over-hint treatment the three pickers below use, and
the .settings__action border, because it is both of those things: a choice
among a small set, and a control that leaves the screen. `display: flex`
rather than block so the 44px minimum is a real touch target rather than the
height two lines of text happen to make. */
.settings__link {
display: flex;
flex-direction: column;
justify-content: center;
gap: 2px;
min-height: var(--min-touch-target, 44px);
padding: var(--space-2, 8px) var(--space-3, 12px);
font-size: 14px;
font-weight: 600;
color: var(--fg-1);
text-decoration: none;
background: var(--bg-surface);
border: 1px solid var(--border-2);
border-radius: 10px;
}
.settings__link-hint {
font-size: 11px;
font-weight: 400;
color: var(--fg-3);
}
/* ---------- Light / Dark / Auto (ThemePicker.tsx) ---------- */
/* Deliberately the same segmented treatment as the background picker in the
* group above it (chrome/chrome.css), because they are the same kind of thing:
* a small, mutually exclusive set where every option is worth seeing at once.
* Two visual languages for that on one screen is one to learn for nothing.
*
* Its own class rather than reusing `.bg-picker`, since the two live in
* different stylesheets for different components and a shared class would make
* every future change to one silently a change to the other. The four pickers
* that DO live in this stylesheet - theme, map style, map detail and units -
* share each rule as a selector list instead: same file, same screen, same
* kind of control, so a change to the treatment SHOULD reach all of them, and
* four hand-copied blocks would only offer four chances to miss one. */
.theme-picker,
.map-style-picker,
.map-detail-picker,
.unit-picker {
margin: 0;
padding: 0;
border: 0;
}
.theme-picker__legend,
.map-style-picker__legend,
.map-detail-picker__legend,
.unit-picker__legend {
padding: 0;
margin-bottom: var(--space-2, 8px);
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--fg-3);
}
.theme-picker__options,
.map-style-picker__options,
.map-detail-picker__options,
.unit-picker__options {
display: flex;
gap: var(--space-2, 8px);
}
.theme-picker__option,
.map-style-picker__option,
.map-detail-picker__option,
.unit-picker__option {
/* Each option is the containing block for its own hidden radio (below).
Unanchored, the radio's absolute box resolved against the document -
where the screen's scroll pane could not clip it, so the radios of
whichever pickers sat below the first viewport-full stretched the PAGE
and gave Settings a scrollbar within a scrollbar (#631). */
position: relative;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
gap: 2px;
min-height: var(--min-touch-target, 44px);
padding: var(--space-2, 8px) var(--space-3, 12px);
background: var(--bg-surface);
border: 1px solid var(--border-1);
border-radius: 10px;
cursor: pointer;
}
.theme-picker__option[data-selected='true'],
.map-style-picker__option[data-selected='true'],
.map-detail-picker__option[data-selected='true'],
.unit-picker__option[data-selected='true'] {
border-color: var(--brand-primary);
box-shadow: inset 0 0 0 1px var(--brand-primary);
}
/* Visually hidden rather than removed: a display:none radio is unfocusable,
* which would cost the arrow-key behaviour a real radio group was chosen for.
* The label is the hit target, and it is the whole segment. */
.theme-picker__input,
.map-style-picker__input,
.map-detail-picker__input,
.unit-picker__input {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.theme-picker__input:focus-visible + .theme-picker__label,
.map-style-picker__input:focus-visible + .map-style-picker__label,
.map-detail-picker__input:focus-visible + .map-detail-picker__label,
.unit-picker__input:focus-visible + .unit-picker__label {
outline: 2px solid var(--brand-primary);
outline-offset: 2px;
border-radius: 3px;
}
.theme-picker__label,
.map-style-picker__label,
.map-detail-picker__label,
.unit-picker__label {
font-size: 14px;
color: var(--fg-1);
}
.theme-picker__option[data-selected='true'] .theme-picker__label,
.map-style-picker__option[data-selected='true'] .map-style-picker__label,
.map-detail-picker__option[data-selected='true'] .map-detail-picker__label,
.unit-picker__option[data-selected='true'] .unit-picker__label {
font-weight: 700;
}
.theme-picker__hint,
.map-style-picker__hint,
.map-detail-picker__hint,
.unit-picker__hint {
font-size: 11px;
color: var(--fg-3);
}
.theme-picker__description,
.map-style-picker__description,
.map-detail-picker__description,
.unit-picker__description {
margin: var(--space-2, 8px) 0 0;
font-size: 12px;
color: var(--fg-3);
}
/* The style picker alone carries five segments where its siblings carry
* three, so it alone is allowed to wrap: a floor on segment width keeps each
* one tappable, and on a phone the row breaks to two lines rather than
* crushing five labels into sliver columns. */
.map-style-picker__options {
flex-wrap: wrap;
}
.map-style-picker__option {
flex: 1 1 30%;
min-width: 104px;
}
/* A report the server refused for good (#243).
*
* Deliberately the same danger treatment as .settings__locked rather than a
* new one: both say "this will not resolve itself", and a second visual
* language for the same class of news is a second thing to learn. Louder
* than .settings__note, which is where "waiting to send" lives - the whole
* point is that these two are not the same news. */
.more__stuck {
display: flex;
flex-direction: column;
gap: var(--space-2, 8px);
padding: var(--space-3, 12px);
background: color-mix(in srgb, var(--danger) 8%, transparent);
border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
border-radius: 10px;
}
.more__stuck-heading {
margin: 0;
font-size: 13px;
font-weight: 600;
color: var(--danger);
}
.more__stuck-list {
display: flex;
flex-direction: column;
gap: var(--space-3, 12px);
margin: 0;
padding: 0;
list-style: none;
}
.more__stuck-item {
display: flex;
flex-direction: column;
gap: var(--space-2, 8px);
}
.more__stuck-reason {
font-size: 13px;
color: var(--fg-1);
}
/* Wraps rather than shrinking: both buttons keep the 44px touch target,
* because this is read and tapped with a gloved thumb like everything else
* out here. */
.more__stuck-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-2, 8px);
}
/* The delete confirmation's one sentence, stated where the tap pays it. */
.more__stuck-confirm {
flex-basis: 100%;
font-size: 13px;
font-weight: 600;
color: var(--fg-1);
}
/* ---------- Your hike (HikePicker.tsx) ---------- */
/* A label wrapping its own input, so the two are associated without an id -
* the same pattern the rest of this screen's controls use. Stacked rather than
* side by side because a mile marker on the AT is up to six characters and a
* cramped number field is the one thing that makes a gloved thumb give up. */
.settings__field {
display: flex;
flex-direction: column;
gap: var(--space-1, 4px);
font-size: 13px;
color: var(--fg-2);
}
.settings__field input {
min-height: var(--min-touch-target, 44px);
padding: 0 var(--space-3, 12px);
font-size: 16px; /* 16px or iOS zooms the whole page on focus. */
color: var(--fg-1);
background: var(--bg-surface);
border: 1px solid var(--border-2);
border-radius: 10px;
}
.settings__action:disabled {
opacity: 0.5;
cursor: default;
}
/* The full waypoint-category list (#530). A fieldset rather than a run of rows,
because the rows are one decision with many parts and a screen reader should
hear the group name before the first of them. Borderless: the section heading
above already frames it, and a second box inside a box reads as a nested
setting rather than a list. */
.settings__waypoints {
margin: 0;
padding: 0;
border: 0;
}