@loidolt/theme-styles 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,6 +48,58 @@
48
48
  padding-inline: var(--loidolt-pad-control-x-sm);
49
49
  background: var(--loidolt-surface-input);
50
50
  }
51
+ /*
52
+ * The system's own select clothes ignore the theme's height and padding — WebKit draws a 28px
53
+ * pill whatever the box says — so a single-line select drops them and draws its own chevron.
54
+ * Longhands, after the boxed rule, so the box's background colour stays.
55
+ */
56
+ .ldt-select:not([multiple], [size]) {
57
+ appearance: none;
58
+ padding-inline-end: calc(var(--loidolt-pad-control-x-sm) + 1rem);
59
+ background-image:
60
+ linear-gradient(45deg, transparent 50%, var(--loidolt-text-muted) 50%),
61
+ linear-gradient(135deg, var(--loidolt-text-muted) 50%, transparent 50%);
62
+ background-position:
63
+ calc(100% - 0.85rem) 55%,
64
+ calc(100% - 0.55rem) 55%;
65
+ background-size: 0.3rem 0.3rem;
66
+ background-repeat: no-repeat;
67
+ }
68
+ /* The chevron sits at the inline end, where the padding makes room for it. */
69
+ .ldt-select:not([multiple], [size]):dir(rtl) {
70
+ background-position:
71
+ 0.55rem 55%,
72
+ 0.85rem 55%;
73
+ }
74
+ /* Forced colours drop gradients, and with them the chevron: the system's own arrow comes back. */
75
+ @media (forced-colors: active) {
76
+ .ldt-select:not([multiple], [size]) {
77
+ appearance: auto;
78
+ }
79
+ }
80
+ /* NumberField draws its own − and +; the browser's spinner would be a second, smaller pair. */
81
+ .ldt-number-field__input {
82
+ appearance: textfield;
83
+ }
84
+ .ldt-number-field__input::-webkit-inner-spin-button,
85
+ .ldt-number-field__input::-webkit-outer-spin-button {
86
+ margin: 0;
87
+ appearance: none;
88
+ }
89
+ /* Disabled reads as disabled, not as an empty boxed field. */
90
+ .ldt-input:disabled,
91
+ .ldt-select:disabled,
92
+ .ldt-textarea:disabled,
93
+ .ldt-number-field__input:disabled {
94
+ border-style: dashed;
95
+ color: var(--loidolt-text-muted);
96
+ /* iOS WebKit paints disabled text with its own fill colour and fades the field to 40% on top,
97
+ so the muted colour applies only through the fill colour, at full opacity. */
98
+ -webkit-text-fill-color: var(--loidolt-text-muted);
99
+ opacity: 1;
100
+ /* A colour longhand, so a single-line select keeps its chevron. */
101
+ background-color: transparent;
102
+ }
51
103
  /* The focus ring itself comes from the `loidolt.a11y` layer; this only tints the border. */
52
104
  .ldt-input:focus-visible,
53
105
  .ldt-select:focus-visible,
@@ -64,6 +116,94 @@
64
116
  min-height: 6rem;
65
117
  resize: vertical;
66
118
  }
119
+ /*
120
+ * AnnotatedText: a real textarea over a mirror that draws the marks. Both elements share the
121
+ * textarea classes, so the box, padding and type line up; the rules below only make the textarea
122
+ * see-through and the mirror's text invisible, and keep every wrapping property identical.
123
+ */
124
+ .ldt-annotated-text {
125
+ display: grid;
126
+ gap: var(--loidolt-gap-field);
127
+ min-width: 0;
128
+ }
129
+ .ldt-annotated-text__field {
130
+ position: relative;
131
+ min-width: 0;
132
+ }
133
+ .ldt-annotated-text__input,
134
+ .ldt-annotated-text__mirror {
135
+ white-space: pre-wrap;
136
+ overflow-wrap: break-word;
137
+ word-break: normal;
138
+ tab-size: 4;
139
+ font: inherit;
140
+ letter-spacing: normal;
141
+ text-align: start;
142
+ }
143
+ .ldt-annotated-text__input {
144
+ position: relative;
145
+ display: block;
146
+ background: transparent;
147
+ }
148
+ .ldt-annotated-text__mirror {
149
+ position: absolute;
150
+ inset: 0;
151
+ overflow: hidden;
152
+ border-color: transparent;
153
+ color: transparent;
154
+ pointer-events: none;
155
+ resize: none;
156
+ user-select: none;
157
+ }
158
+ /* Colour is never the only signal: each variant also has its own underline style. */
159
+ .ldt-annotated-text__mark {
160
+ --ldt-mark-color: var(--loidolt-border-strong);
161
+ border-radius: var(--loidolt-radius-inner);
162
+ background: color-mix(in srgb, var(--ldt-mark-color) 16%, transparent);
163
+ text-decoration: underline dashed var(--ldt-mark-color);
164
+ text-decoration-thickness: 2px;
165
+ text-underline-offset: 0.2em;
166
+ }
167
+ .ldt-annotated-text__mark--accent {
168
+ --ldt-mark-color: var(--loidolt-accent);
169
+ text-decoration-style: solid;
170
+ }
171
+ .ldt-annotated-text__mark--info {
172
+ --ldt-mark-color: var(--loidolt-info);
173
+ text-decoration-style: dotted;
174
+ }
175
+ .ldt-annotated-text__mark--success {
176
+ --ldt-mark-color: var(--loidolt-success);
177
+ text-decoration-style: solid;
178
+ }
179
+ .ldt-annotated-text__mark--warning {
180
+ --ldt-mark-color: var(--loidolt-warning);
181
+ text-decoration-style: double;
182
+ }
183
+ .ldt-annotated-text__mark--error {
184
+ --ldt-mark-color: var(--loidolt-danger);
185
+ text-decoration-style: wavy;
186
+ }
187
+ .ldt-annotated-text__mark--active {
188
+ background: color-mix(in srgb, var(--ldt-mark-color) 30%, transparent);
189
+ }
190
+ .ldt-annotated-text__tooltip {
191
+ position: absolute;
192
+ width: max-content;
193
+ /* Never wider than the field it labels. */
194
+ max-width: min(18rem, 100%);
195
+ }
196
+ .ldt-annotated-text__controls {
197
+ display: flex;
198
+ flex-wrap: wrap;
199
+ gap: var(--loidolt-space-2);
200
+ }
201
+ @media (forced-colors: active) {
202
+ .ldt-annotated-text__mark {
203
+ background: Mark;
204
+ forced-color-adjust: none;
205
+ }
206
+ }
67
207
  .ldt-choice {
68
208
  /* The label is the pointer target for the input it wraps, so it carries the 24px minimum. */
69
209
  min-height: 1.5rem;
@@ -116,6 +256,11 @@
116
256
  .ldt-fieldset > :where(.ldt-field__description, .ldt-field__error) {
117
257
  margin-top: var(--loidolt-gap-field);
118
258
  }
259
+ /* A legend sits outside the flow its siblings' gap spaces, so SwatchGroup's swatches would touch
260
+ it; they get the same gap as a fieldset body. */
261
+ .ldt-legend + .ldt-swatch-group {
262
+ margin-top: var(--loidolt-gap-field);
263
+ }
119
264
  .ldt-radio-group {
120
265
  display: flex;
121
266
  flex-wrap: wrap;
@@ -132,6 +277,9 @@
132
277
  border: 0;
133
278
  padding: 0;
134
279
  background: transparent;
280
+ /* A button, so it would take the body face; its label reads like a checkbox's or a radio's. */
281
+ font: var(--loidolt-font-size-sm) var(--loidolt-font-utility);
282
+ letter-spacing: calc(var(--loidolt-control-tracking) * 0.75);
135
283
  }
136
284
  .ldt-switch__track {
137
285
  width: 2.4rem;
@@ -174,15 +322,23 @@
174
322
  border: 0;
175
323
  background: transparent;
176
324
  }
177
- .ldt-number-field__button:hover:not(:disabled, [aria-disabled='true']) {
178
- color: var(--loidolt-text-accent);
179
- background: var(--loidolt-surface-input);
325
+ /* Hover styles apply only where the pointer can hover: a tap leaves `:hover` stuck on touch screens. */
326
+ @media (hover: hover) {
327
+ .ldt-number-field__button:hover:not(:disabled, [aria-disabled='true']) {
328
+ color: var(--loidolt-text-accent);
329
+ background: var(--loidolt-surface-input);
330
+ }
180
331
  }
181
332
  .ldt-number-field__button[aria-disabled='true'] {
182
333
  opacity: 0.4;
183
334
  cursor: not-allowed;
184
335
  }
185
- /* A file picker in the system's input clothes. */
336
+ /* A file picker in the system's input clothes. The "no file chosen" text matches the button. */
337
+ .ldt-file-input {
338
+ max-width: 100%;
339
+ color: var(--loidolt-text-muted);
340
+ font: var(--loidolt-font-size-sm) var(--loidolt-font-utility);
341
+ }
186
342
  .ldt-file-input::file-selector-button {
187
343
  margin-inline-end: var(--loidolt-space-2);
188
344
  border: var(--loidolt-border-width) solid var(--loidolt-border-control);
@@ -196,8 +352,94 @@
196
352
  text-transform: var(--loidolt-control-transform);
197
353
  cursor: pointer;
198
354
  }
199
- .ldt-file-input::file-selector-button:hover {
355
+ @media (hover: hover) {
356
+ .ldt-file-input::file-selector-button:hover {
357
+ color: var(--loidolt-text-accent);
358
+ }
359
+ }
360
+ /*
361
+ * A drop target for files that is also a file picker: the area is the label of a visually hidden
362
+ * file input, so a click, Enter or Space opens the picker and forms submit what was accepted.
363
+ */
364
+ .ldt-dropzone {
365
+ display: grid;
366
+ gap: var(--loidolt-space-2);
367
+ min-width: 0;
368
+ }
369
+ .ldt-dropzone__target {
370
+ position: relative;
371
+ display: grid;
372
+ place-content: center;
373
+ justify-items: center;
374
+ gap: var(--loidolt-space-1);
375
+ min-height: var(--ldt-dropzone-height, 8rem);
376
+ border: var(--loidolt-border-width) dashed var(--loidolt-border-strong);
377
+ border-radius: var(--loidolt-radius-surface);
378
+ padding: var(--loidolt-pad-surface);
379
+ color: var(--loidolt-text);
380
+ background: var(--loidolt-surface-input);
381
+ text-align: center;
382
+ cursor: pointer;
383
+ transition: border-color var(--loidolt-motion-fast) var(--loidolt-motion-easing);
384
+ }
385
+ @media (hover: hover) {
386
+ .ldt-dropzone__target:hover {
387
+ border-color: var(--loidolt-accent);
388
+ }
389
+ }
390
+ /* The input is hidden, so its focus ring is drawn on the area it names. */
391
+ .ldt-dropzone__target:has(.ldt-dropzone__input:focus-visible) {
392
+ outline: var(--loidolt-stroke-focus) solid var(--loidolt-focus-ring);
393
+ outline-offset: 2px; /* @literal clearance between control and ring */
394
+ }
395
+ .ldt-dropzone:is([data-dragging], [data-window-dragging]) .ldt-dropzone__target {
396
+ border-style: solid;
397
+ border-color: var(--loidolt-accent);
398
+ background: var(--loidolt-surface-alt);
399
+ }
400
+ .ldt-dropzone[data-disabled] .ldt-dropzone__target {
401
+ border-color: var(--loidolt-border-control);
402
+ cursor: not-allowed;
403
+ opacity: 0.5;
404
+ }
405
+ .ldt-dropzone__label {
406
+ font: var(--loidolt-font-size-md) var(--loidolt-font-utility);
407
+ font-weight: var(--loidolt-strong-weight);
408
+ }
409
+ .ldt-dropzone__browse {
200
410
  color: var(--loidolt-text-accent);
411
+ font: var(--loidolt-font-size-sm) var(--loidolt-font-utility);
412
+ text-decoration: underline;
413
+ }
414
+ .ldt-dropzone__hint {
415
+ color: var(--loidolt-text-muted);
416
+ font: var(--loidolt-font-size-xs) / 1.5 var(--loidolt-font-utility);
417
+ }
418
+ .ldt-dropzone__error {
419
+ margin: 0;
420
+ color: var(--loidolt-text-danger);
421
+ font: var(--loidolt-font-size-xs) / 1.5 var(--loidolt-font-utility);
422
+ }
423
+ /* Whole-window mode: shown while files are dragged anywhere over the page. */
424
+ .ldt-dropzone__overlay {
425
+ position: fixed;
426
+ z-index: var(--loidolt-z-overlay);
427
+ inset: 0;
428
+ display: grid;
429
+ place-items: center;
430
+ padding: var(--loidolt-pad-page);
431
+ background: var(--loidolt-scrim);
432
+ pointer-events: none;
433
+ }
434
+ .ldt-dropzone__overlay-label {
435
+ border: var(--loidolt-stroke-indicator) dashed var(--loidolt-accent);
436
+ border-radius: var(--loidolt-radius-overlay);
437
+ padding: var(--loidolt-pad-overlay);
438
+ color: var(--loidolt-text);
439
+ background: var(--loidolt-surface);
440
+ box-shadow: var(--loidolt-shadow-modal);
441
+ font: var(--loidolt-font-size-lg) var(--loidolt-font-utility);
442
+ font-weight: var(--loidolt-strong-weight);
201
443
  }
202
444
  /* A palette as a real radio group: one pressed swatch, arrow-key movement. */
203
445
  .ldt-swatch-group {
@@ -354,6 +596,18 @@
354
596
  font-variant-numeric: tabular-nums;
355
597
  text-align: end;
356
598
  }
599
+ /* On a phone the readout sits above the track, so the track keeps the full width and sliders
600
+ with readouts of different lengths line up. */
601
+ @media (max-width: 30rem) {
602
+ .ldt-slider:not(.ldt-slider--vertical):has(> .ldt-slider__value) {
603
+ flex-wrap: wrap;
604
+ row-gap: var(--loidolt-space-1);
605
+ }
606
+ .ldt-slider:not(.ldt-slider--vertical) > .ldt-slider__value {
607
+ order: -1;
608
+ flex-basis: 100%;
609
+ }
610
+ }
357
611
  .ldt-slider[data-disabled] {
358
612
  opacity: 0.45;
359
613
  }
@@ -422,10 +676,14 @@
422
676
  color: var(--loidolt-text-muted);
423
677
  background: transparent;
424
678
  }
425
- .ldt-password-input__toggle:hover:not(:disabled),
426
679
  .ldt-password-input__toggle[aria-pressed='true'] {
427
680
  color: var(--loidolt-text-accent);
428
681
  }
682
+ @media (hover: hover) {
683
+ .ldt-password-input__toggle:hover:not(:disabled) {
684
+ color: var(--loidolt-text-accent);
685
+ }
686
+ }
429
687
 
430
688
  /* One-time code: one square cell per character over a single hidden input. */
431
689
  .ldt-otp-input {
@@ -58,7 +58,16 @@
58
58
  color: var(--loidolt-text);
59
59
  background: var(--loidolt-surface);
60
60
  }
61
+ /*
62
+ * The brand and the page title are display type: at the largest system text sizes they would fill
63
+ * the first screen and break words apart, so they stop growing at a multiple of their default —
64
+ * the brand at 1.5x, the title at 2x, which keeps it above running text at the largest iOS size
65
+ * (about 3.1x) while body text keeps scaling. Under iOS text zoom, which
66
+ * `-webkit-text-size-adjust` applies after `min()`, they fold `--ldt-text-zoom` into the `min()`
67
+ * and opt out of the inherited adjustment, as the TabBar label does (see there).
68
+ */
61
69
  .ldt-brand {
70
+ -webkit-text-size-adjust: calc(var(--ldt-text-zoom) * 0% + 100%);
62
71
  display: inline-flex;
63
72
  flex: 0 0 auto;
64
73
  align-items: baseline;
@@ -70,13 +79,20 @@
70
79
  text-decoration: none;
71
80
  }
72
81
  .ldt-brand__name {
73
- font-size: var(--loidolt-font-size-lg);
82
+ font-size: min(
83
+ calc(var(--loidolt-font-size-lg) * var(--ldt-text-zoom, 1)),
84
+ calc(var(--loidolt-font-size-lg) * 1.5)
85
+ );
74
86
  font-weight: var(--loidolt-heading-weight);
75
87
  letter-spacing: -0.02em; /* @literal brand lockup */
76
88
  }
77
89
  .ldt-brand__meta {
78
90
  color: var(--loidolt-text-accent);
79
- font: var(--loidolt-font-size-xs) var(--loidolt-font-utility);
91
+ font: min(
92
+ calc(var(--loidolt-font-size-xs) * var(--ldt-text-zoom, 1)),
93
+ calc(var(--loidolt-font-size-xs) * 1.5)
94
+ )
95
+ var(--loidolt-font-utility);
80
96
  font-weight: var(--loidolt-label-weight);
81
97
  letter-spacing: calc(var(--loidolt-label-tracking) * 1.2);
82
98
  text-transform: var(--loidolt-label-transform);
@@ -115,8 +131,11 @@
115
131
  letter-spacing: var(--loidolt-control-tracking);
116
132
  text-transform: var(--loidolt-control-transform);
117
133
  }
118
- .ldt-nav-menu:hover:not(:disabled, [aria-disabled='true']) {
119
- color: var(--loidolt-text);
134
+ /* Hover styles apply only where the pointer can hover: a tap leaves `:hover` stuck on touch screens. */
135
+ @media (hover: hover) {
136
+ .ldt-nav-menu:hover:not(:disabled, [aria-disabled='true']) {
137
+ color: var(--loidolt-text);
138
+ }
120
139
  }
121
140
  .ldt-nav-menu[data-state='open'] {
122
141
  color: var(--loidolt-text);
@@ -138,9 +157,11 @@
138
157
  font-size: var(--loidolt-font-size-sm);
139
158
  text-decoration: none;
140
159
  }
141
- .ldt-topbar__link:hover {
142
- color: var(--loidolt-text);
143
- text-decoration: none;
160
+ @media (hover: hover) {
161
+ .ldt-topbar__link:hover {
162
+ color: var(--loidolt-text);
163
+ text-decoration: none;
164
+ }
144
165
  }
145
166
  .ldt-topbar__link[aria-current='page'] {
146
167
  color: var(--loidolt-text);
@@ -206,6 +227,67 @@
206
227
  var(--loidolt-size-inspector)
207
228
  );
208
229
  }
230
+ /*
231
+ * `resizable`: the main pane and the inspector share what the sidebar leaves as flex fractions
232
+ * the component writes (`--ldt-main-share`, `--ldt-inspector-share`), with the divider in an
233
+ * auto column between them.
234
+ */
235
+ .ldt-workspace--resizable {
236
+ grid-template-columns:
237
+ minmax(0, var(--ldt-main-share, 70fr)) auto
238
+ minmax(0, var(--ldt-inspector-share, 30fr));
239
+ }
240
+ .ldt-workspace--sidebar.ldt-workspace--resizable {
241
+ grid-template-columns:
242
+ var(--ldt-sidebar-width, var(--loidolt-size-sidebar)) minmax(0, var(--ldt-main-share, 70fr))
243
+ auto minmax(0, var(--ldt-inspector-share, 30fr));
244
+ }
245
+ .ldt-workspace--resizing {
246
+ cursor: col-resize;
247
+ user-select: none;
248
+ }
249
+ /* The wrapper is the grid item; the inspector inside fills it and scrolls on its own. */
250
+ .ldt-workspace__inspector {
251
+ min-width: 0;
252
+ min-height: 0;
253
+ display: grid;
254
+ grid-template: minmax(0, 1fr) / minmax(0, 1fr);
255
+ }
256
+ /* The divider draws the line between the panes, so a Sidebar beside it drops its own. */
257
+ .ldt-workspace__inspector > .ldt-sidebar--right {
258
+ border-left: 0;
259
+ }
260
+ .ldt-workspace__divider {
261
+ position: relative;
262
+ z-index: var(--loidolt-z-raised);
263
+ width: var(--loidolt-border-width);
264
+ background: var(--loidolt-border);
265
+ cursor: col-resize;
266
+ /* A touch drag resizes rather than scrolling the page. */
267
+ touch-action: none;
268
+ }
269
+ /* The hit area: 24px, the WCAG 2.5.8 target minimum, centred on the 1px line. */
270
+ .ldt-workspace__divider::before,
271
+ .ldt-workspace__divider::after {
272
+ content: '';
273
+ position: absolute;
274
+ inset-block: 0;
275
+ left: 50%;
276
+ translate: -50% 0;
277
+ }
278
+ .ldt-workspace__divider::before {
279
+ width: var(--loidolt-space-6);
280
+ }
281
+ /* The grip line, drawn in accent while hovered, focused or dragged. */
282
+ .ldt-workspace__divider::after {
283
+ width: var(--loidolt-stroke-indicator);
284
+ background: transparent;
285
+ transition: background-color var(--loidolt-motion-fast) var(--loidolt-motion-easing);
286
+ }
287
+ .ldt-workspace__divider:focus-visible::after,
288
+ .ldt-workspace--resizing .ldt-workspace__divider::after {
289
+ background: var(--loidolt-accent);
290
+ }
209
291
  /* An optional header row (ContextBar, toolbars) above the panes, spanning every column. */
210
292
  .ldt-workspace--header {
211
293
  grid-template-rows: auto minmax(0, 1fr);
@@ -214,7 +296,10 @@
214
296
  grid-column: 1 / -1;
215
297
  min-width: 0;
216
298
  }
299
+ /* Positioned so absolutely positioned content (visually hidden text) scrolls and clips with the
300
+ pane instead of stretching the page; see `.ldt-table-wrap`. */
217
301
  .ldt-sidebar {
302
+ position: relative;
218
303
  min-width: 0;
219
304
  overflow-y: auto;
220
305
  padding: var(--loidolt-pad-pane);
@@ -288,7 +373,8 @@
288
373
  align-items: center;
289
374
  justify-content: center;
290
375
  gap: var(--loidolt-space-1);
291
- padding: var(--loidolt-space-2) var(--loidolt-space-1);
376
+ /* The sides stop growing with the text size: at 200% they would take a fifth of the label's room. */
377
+ padding: var(--loidolt-space-2) min(var(--loidolt-space-1), 4px);
292
378
  color: inherit;
293
379
  font: var(--loidolt-font-size-xs) var(--loidolt-font-utility);
294
380
  font-weight: var(--loidolt-control-weight);
@@ -299,6 +385,9 @@
299
385
  }
300
386
  /* A tap leaves `:hover` stuck on touch screens, where it would read as a second current tab. */
301
387
  @media (hover: hover) {
388
+ .ldt-workspace__divider:hover::after {
389
+ background: var(--loidolt-accent);
390
+ }
302
391
  .ldt-tab-bar__item:hover {
303
392
  color: var(--loidolt-text);
304
393
  background: var(--loidolt-surface-alt);
@@ -319,11 +408,28 @@
319
408
  width: 1.5rem; /* @literal icons are sized for the eye, not the label */
320
409
  height: 1.5rem; /* @literal icons are sized for the eye, not the label */
321
410
  }
411
+ /*
412
+ * A fifth of a phone is not much room once the system text size doubles every rem. Native tab bars
413
+ * keep their labels at a fixed size; this one lets the label grow with the text size up to about
414
+ * a quarter more than its default (14px), which still fits a short word in each of five tabs at
415
+ * 375px, and then wraps rather than ellipsizing, so the whole name stays on screen. A word too long
416
+ * for its tab is hyphenated, or broken as a last resort, never clipped.
417
+ *
418
+ * Text zoom that arrives as `-webkit-text-size-adjust` (Capacitor's TextZoom on iOS) is applied
419
+ * after `min()`, so it would carry the label past the cap. `--ldt-text-zoom`, the factor
420
+ * `followSystemTextSize` publishes there, moves that zoom into the `min()`; the `calc()` opts the
421
+ * label out of the inherited adjustment only while the variable is set, and is otherwise invalid,
422
+ * so the label inherits the page's adjustment as before.
423
+ */
322
424
  .ldt-tab-bar__label {
323
425
  max-width: 100%;
324
- overflow: hidden;
325
- text-overflow: ellipsis;
326
- white-space: nowrap;
426
+ font-size: min(calc(1em * var(--ldt-text-zoom, 1)), 14px);
427
+ line-height: var(--loidolt-font-line-height-tight);
428
+ text-align: center;
429
+ text-wrap: balance;
430
+ overflow-wrap: anywhere;
431
+ hyphens: auto;
432
+ -webkit-text-size-adjust: calc(var(--ldt-text-zoom) * 0% + 100%);
327
433
  }
328
434
  .ldt-page-header {
329
435
  display: flex;
@@ -334,9 +440,14 @@
334
440
  padding-bottom: var(--loidolt-space-4);
335
441
  border-bottom: var(--loidolt-border-width) solid var(--loidolt-border);
336
442
  }
443
+ /* Capped like the brand, at 2x; see `.ldt-brand`. */
337
444
  .ldt-page-header__title {
445
+ -webkit-text-size-adjust: calc(var(--ldt-text-zoom) * 0% + 100%);
338
446
  margin: 0;
339
- font-size: var(--loidolt-font-size-xl);
447
+ font-size: min(
448
+ calc(var(--loidolt-font-size-xl) * var(--ldt-text-zoom, 1)),
449
+ calc(var(--loidolt-font-size-xl) * 2)
450
+ );
340
451
  /* A long unbroken title — a file name, an identifier — must still reflow at 320px. */
341
452
  overflow-wrap: anywhere;
342
453
  }
@@ -361,7 +472,8 @@
361
472
  font-size: var(--loidolt-font-size-lg);
362
473
  }
363
474
 
364
- /* Single breakpoint, mirroring `tokens.breakpoints.compact`. */
475
+ /* The layout's breakpoint, mirroring `tokens.breakpoints.compact`. Components that only need to
476
+ rearrange on a phone use `30rem` instead, in rem so it follows the text size. */
365
477
  @media (max-width: 760px) {
366
478
  .ldt-topbar {
367
479
  min-height: auto;
@@ -369,9 +481,9 @@
369
481
  var(--loidolt-space-3);
370
482
  gap: var(--loidolt-space-3);
371
483
  }
484
+ /* Beside the brand while they fit, on a row of their own once they do not; either way they
485
+ shrink and scroll rather than push the page sideways. */
372
486
  .ldt-topbar__actions {
373
- width: 100%;
374
- margin-left: 0;
375
487
  overflow-x: auto;
376
488
  }
377
489
  .ldt-contextbar {
@@ -401,6 +513,13 @@
401
513
  .ldt-workspace__main {
402
514
  padding: var(--loidolt-space-4);
403
515
  }
516
+ /* Stacked, there is nothing to resize: the divider leaves the layout and the tab order. */
517
+ .ldt-workspace__divider {
518
+ display: none;
519
+ }
520
+ .ldt-workspace__inspector {
521
+ display: block;
522
+ }
404
523
  .ldt-page-header {
405
524
  align-items: start;
406
525
  flex-direction: column;
@@ -424,6 +543,13 @@
424
543
  .ldt-workspace__main {
425
544
  padding: var(--loidolt-space-4);
426
545
  }
546
+ /* Stacked, there is nothing to resize: the divider leaves the layout and the tab order. */
547
+ .ldt-workspace__divider {
548
+ display: none;
549
+ }
550
+ .ldt-workspace__inspector {
551
+ display: block;
552
+ }
427
553
  }
428
554
  /* A row of list controls — search, filters, view options — on the recessed surface. */
429
555
  .ldt-toolbar {
@@ -54,8 +54,11 @@
54
54
  .ldt-map .maplibregl-ctrl-group button + button {
55
55
  border-top: var(--loidolt-border-width) solid var(--loidolt-border);
56
56
  }
57
- .ldt-map .maplibregl-ctrl-group button:not(:disabled):hover {
58
- background: var(--loidolt-surface-alt);
57
+ /* Hover styles apply only where the pointer can hover: a tap leaves `:hover` stuck on touch screens. */
58
+ @media (hover: hover) {
59
+ .ldt-map .maplibregl-ctrl-group button:not(:disabled):hover {
60
+ background: var(--loidolt-surface-alt);
61
+ }
59
62
  }
60
63
  .ldt-map .maplibregl-ctrl-group button:focus-visible {
61
64
  box-shadow: none;
@@ -106,7 +109,19 @@
106
109
  }
107
110
  .ldt-map .maplibregl-ctrl-attrib-button {
108
111
  border-radius: 0;
112
+ color: var(--loidolt-text);
109
113
  background-color: transparent;
114
+ background-image: none;
115
+ }
116
+ /* The (i) is not a `button` with an icon span, so the mask above misses it and MapLibre's dark
117
+ image would vanish on a dark surface. It gets the same treatment on a pseudo-element, which
118
+ leaves the focus ring and the touch area unmasked. */
119
+ .ldt-map .maplibregl-ctrl-attrib-button::before {
120
+ content: '';
121
+ position: absolute;
122
+ inset: 0;
123
+ background-color: currentColor;
124
+ mask: var(--ldt-map-icon) center / 1rem 1rem no-repeat;
110
125
  }
111
126
  .ldt-map .maplibregl-ctrl-scale {
112
127
  border-color: var(--loidolt-text-muted);
@@ -201,6 +216,13 @@
201
216
  max-height: calc(var(--ldt-map-height, 25rem) - 4.5rem);
202
217
  overflow-y: auto;
203
218
  }
219
+ /* On a phone the open panel would cover most of the map: it stops at about half its height and
220
+ scrolls, and the title still folds it away. */
221
+ @media (max-width: 30rem) {
222
+ .ldt-layer-manager {
223
+ max-height: calc(var(--ldt-map-height, 25rem) * 0.5);
224
+ }
225
+ }
204
226
  .ldt-layer-manager__title {
205
227
  margin: 0;
206
228
  }
@@ -308,8 +330,10 @@ span.ldt-map-marker {
308
330
  text-align: start;
309
331
  cursor: pointer;
310
332
  }
311
- .ldt-map-features__item:hover {
312
- background: var(--loidolt-surface-alt);
333
+ @media (hover: hover) {
334
+ .ldt-map-features__item:hover {
335
+ background: var(--loidolt-surface-alt);
336
+ }
313
337
  }
314
338
  .ldt-map-features__item[aria-current='true'] {
315
339
  border-left-color: var(--loidolt-accent);
@@ -321,6 +345,7 @@ span.ldt-map-marker {
321
345
  }
322
346
 
323
347
  @media (forced-colors: active) {
348
+ .ldt-map .maplibregl-ctrl-attrib-button::before,
324
349
  .ldt-map .maplibregl-ctrl button .maplibregl-ctrl-icon {
325
350
  background-color: ButtonText;
326
351
  }