crcbl-ui 0.2.1

Crucible immediate-mode GUI
Documentation
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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
/*
 * The engine's own look: crcbl-ui's widgets, below every stylesheet an app
 * adds. An app restyles a widget by naming the same selectors in its own
 * sheet, which wins over this one whatever the specificity.
 *
 * The tree's plain `block` and `span` have no rule here. Their look is CSS's
 * initial values (`NodeStyle::DEFAULT`), and `color` and `font-size` inherit:
 * a type rule for either would stop a span taking its panel's colour.
 */

/*
 * ReadoutPanel: a column of fixed-height rows, each a label at the left and
 * a reading against the right edge. Its width, row height, padding, border
 * and colours are the panel's public fields, set inline per panel.
 *
 * It draws in the bitmap font. That is the initial `font-family` too; it is
 * named here so the panel keeps it whatever the initial value becomes, and a
 * rule selecting `sans-serif` for `readout` is what switches it.
 */
readout,
readout-surface {
  font-family: bitmap;
}

readout {
  flex-direction: column;
}

.readout-reading {
  position: absolute;
  top: 0;
  right: 0;
}

/* ReadoutPanel::hint: one line centred along the bottom of the surface. */
readout-surface {
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

/* A hint taller than the room above it overflows rather than squashing. */
.readout-hint {
  flex-shrink: 0;
}

/*
 * DebugPanel: a column of sections, each a title over `label: value` rows.
 * Its colours, font size, padding and the two gaps are `DebugStyle`'s, set
 * inline per panel; the labels' `min-width` is the widest label in the whole
 * panel, which is what puts every value in one column across sections.
 *
 * It draws in the bitmap font, for the reason `readout` names: a developer
 * tool stays legible whatever an app's sheet selects for its own text.
 */
debug-panel {
  font-family: bitmap;
  flex-direction: column;
}

.debug-section {
  flex-direction: column;
}

/* A row is as wide as the panel; neither of its spans gives up a column. */
.debug-title,
.debug-label,
.debug-value {
  flex-shrink: 0;
}

/*
 * The widget set: crcbl_ui::tree::widgets, in one dark theme. A game restyles
 * a widget by naming the same selectors in its own sheet.
 *
 * Each widget's look is its type (`button`, `slider`, ...) and the classes
 * of its parts; its state is a pseudo-class — `:hover` and `:active` from
 * the pointer, `:focus` from the pad or the keyboard, `:engaged`,
 * `:disabled`, and `:checked`, `:open` or `:refused`. Rules for one widget
 * run base, hover, active, engaged, then checked, open or refused, then
 * disabled, so the later state wins within a tier.
 */

/* The focus ring: one rule for every focusable part of the set. */
button:focus,
checkbox:focus,
slider:focus,
drag-value:focus,
collapsing > .collapsing-header:focus,
tree-node > .tree-row:focus,
split > .split-divider:focus,
text-input:focus,
.tab-strip > .tab:focus,
select:focus,
.select-list > .select-option:focus,
.context-menu > .context-item:focus {
  outline: 2px #f5c400;
  outline-offset: 1px;
}

/*
 * A row is clipped by the list or outliner that scrolls it, so its ring is
 * drawn inside it.
 */
list .list-row:focus,
outliner .outliner-row:focus {
  outline: 2px #f5c400;
  outline-offset: -2px;
}

/* Button. */
button {
  padding: 2px 6px;
  border-width: 1px;
  border-color: #4a5468;
  background: #2a303c;
  color: #e6e9ef;
}

button:hover {
  background: #353d4c;
}

button:active {
  background: #1f242d;
}

button:disabled {
  background: #23272f;
  color: #7a8190;
}

/* Checkbox: a box with a mark inside that shows while checked. */
checkbox {
  gap: 6px;
  align-items: center;
  color: #e6e9ef;
}

.checkbox-box {
  width: 12px;
  height: 12px;
  padding: 2px;
  border-width: 1px;
  border-color: #4a5468;
  background: #171a20;
}

.checkbox-mark {
  flex-grow: 1;
}

checkbox:hover > .checkbox-box {
  border-color: #e6e9ef;
}

checkbox:checked > .checkbox-box > .checkbox-mark {
  background: #3d8bfd;
}

checkbox:disabled {
  color: #7a8190;
}

checkbox:disabled > .checkbox-box > .checkbox-mark {
  background: #7a8190;
}

/* Slider: a well with a fill as wide as the value's share. */
slider {
  width: 120px;
  height: 12px;
  padding: 2px;
  border-width: 1px;
  border-color: #4a5468;
  background: #171a20;
}

.slider-fill {
  background: #3d8bfd;
}

slider:hover {
  border-color: #e6e9ef;
}

slider:engaged {
  border-color: #3d8bfd;
  background: #1d3557;
}

slider:disabled > .slider-fill {
  background: #7a8190;
}

/* Drag-value: its number in a field. */
drag-value {
  min-width: 48px;
  padding: 2px 6px;
  border-width: 1px;
  border-color: #4a5468;
  background: #2a303c;
  color: #e6e9ef;
}

drag-value:hover {
  background: #353d4c;
}

drag-value:active {
  background: #1f242d;
}

drag-value:engaged {
  border-color: #3d8bfd;
  background: #1d3557;
}

/* A number typed into it that it refused: text naming no number it holds. */
drag-value:refused {
  border-color: #e5484d;
}

drag-value:disabled {
  background: #23272f;
  color: #7a8190;
}

/* Collapsing header: a full-width row, and its body under it while open. */
collapsing {
  flex-direction: column;
  color: #e6e9ef;
}

.collapsing-header {
  gap: 6px;
  padding: 2px 6px;
  background: #2a303c;
}

collapsing > .collapsing-header:hover {
  background: #353d4c;
}

collapsing > .collapsing-header:open {
  background: #353d4c;
}

.collapsing-body {
  flex-direction: column;
  gap: 4px;
  padding: 4px 6px;
}

/* Tree node: a row, and its children indented under it while open. */
tree-node {
  flex-direction: column;
  color: #e6e9ef;
}

.tree-row {
  gap: 4px;
  padding: 1px 4px;
}

tree-node > .tree-row:hover {
  background: #353d4c;
}

.tree-toggle {
  color: #7a8190;
}

tree-node > .tree-row:open > .tree-toggle {
  color: #3d8bfd;
}

.tree-children {
  flex-direction: column;
  padding-left: 12px;
}

/*
 * Split: it grows to fill its parent along the parent's axis, the panes clip
 * what they hold, and the divider has a thickness.
 */
split {
  flex-grow: 1;
  min-width: 0;
  min-height: 0;
}

.split-pane {
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.split-divider {
  background: #4a5468;
}

.split-divider.split-row {
  width: 4px;
}

.split-divider.split-column {
  height: 4px;
}

split > .split-divider:hover {
  background: #e6e9ef;
}

split > .split-divider:engaged {
  background: #3d8bfd;
}

/* List: a well, and rows in it. */
list {
  flex-direction: column;
  border-width: 1px;
  border-color: #4a5468;
  background: #171a20;
  color: #e6e9ef;
}

.list-row {
  padding: 0 4px;
  align-items: center;
}

list .list-row:hover {
  background: #353d4c;
}

/* Scrollbar: a narrow track beside what it scrolls, and a handle to take. */
scrollbar {
  width: 8px;
  flex-shrink: 0;
  background: #171a20;
}

.scroll-handle {
  background: #4a5468;
  border-radius: 3px;
}

scrollbar > .scroll-handle:hover {
  background: #e6e9ef;
}

/*
 * Text input: a well holding one line. The text never wraps or shrinks, so
 * a long line overflows the well and the tree scrolls it to the caret. The
 * selection and the caret are placed on glyph boundaries after layout, and
 * `position: absolute` keeps them out of the text's flow. `:refused` is a
 * clipboard the platform would not offer or read.
 */
text-input {
  width: 120px;
  padding: 2px 4px;
  border-width: 1px;
  border-color: #4a5468;
  background: #171a20;
  color: #e6e9ef;
  overflow: hidden;
}

.text-input-text,
.text-input-placeholder {
  flex-shrink: 0;
}

.text-input-placeholder {
  color: #7a8190;
}

.text-input-selection {
  position: absolute;
  background: #2f5a9e;
}

.text-input-caret {
  position: absolute;
  width: 1px;
  background: #3d8bfd;
}

text-input:hover {
  border-color: #e6e9ef;
}

text-input:engaged {
  border-color: #3d8bfd;
}

text-input:refused {
  border-color: #e5484d;
}

text-input:disabled {
  color: #7a8190;
}

/*
 * Outliner: the same well a list is, with a toggle at the start of each row.
 * Depth is the row's own `padding-left`, written inline by the widget, so a
 * level of nesting costs a number rather than a block — which is why the row
 * has no left padding of its own here. An expanded row is `:open` and a
 * selected one `:checked`.
 */
outliner {
  flex-direction: column;
  border-width: 1px;
  border-color: #4a5468;
  background: #171a20;
  color: #e6e9ef;
}

.outliner-row {
  gap: 2px;
  padding-right: 4px;
  align-items: center;
}

.outliner-toggle {
  width: 9px;
  flex-shrink: 0;
  justify-content: center;
  color: #7a8190;
}

.outliner-row:open > .outliner-toggle {
  color: #3d8bfd;
}

.outliner-toggle:hover {
  color: #e6e9ef;
}

outliner .outliner-row:hover {
  background: #353d4c;
}

outliner .outliner-row:checked {
  background: #2f5a9e;
}

/*
 * Tabs: a strip of tabs over the one pane that is showing. The tab showing is
 * `:checked`, drawn in the accent, and the panes that are not showing are not
 * built at all.
 */
tabs {
  flex-direction: column;
  color: #e6e9ef;
}

.tab-strip {
  gap: 2px;
  flex-shrink: 0;
  overflow: scroll;
}

.tab {
  padding: 1px 6px;
  flex-shrink: 0;
  background: #2a303c;
}

.tab-strip > .tab:hover {
  background: #353d4c;
}

.tab-strip > .tab:checked {
  background: #3d8bfd;
  color: #10121a;
}

.tab-pane {
  flex-grow: 1;
  padding: 2px;
  background: #171a20;
  overflow: hidden;
}

/*
 * Pop-up: a root of its own drawn over the whole tree (`popup.rs`). What is
 * here is a panel's frame; what it holds is its opener's to style. It
 * scrolls, because `Ui::popup` caps its height at the viewport's.
 */
popup {
  flex-direction: column;
  overflow: scroll;
  padding: 1px;
  border-width: 1px;
  border-color: #4a5468;
  background: #171a20;
  color: #e6e9ef;
}

/*
 * Tooltip: a line of text drawn over the whole tree, which the pointer passes
 * through (`tooltip.rs`). It does not wrap, so it is as wide as its text.
 */
tooltip {
  padding: 2px 6px;
  border-width: 1px;
  border-color: #4a5468;
  background: #23272f;
  color: #e6e9ef;
  white-space: nowrap;
}

/*
 * Select: a button showing the chosen option, and its list in a pop-up. The
 * chosen option is `:checked` and drawn in the accent, as the tab showing is;
 * the button is `:open` while its list is.
 */
select {
  gap: 6px;
  padding: 1px 6px;
  align-items: center;
  border-width: 1px;
  border-color: #4a5468;
  background: #2a303c;
  color: #e6e9ef;
}

select:hover {
  background: #353d4c;
}

select:open {
  background: #1f242d;
}

select:disabled {
  background: #23272f;
  color: #7a8190;
}

.select-label {
  flex-grow: 1;
}

.select-caret {
  color: #7a8190;
}

.select-option {
  padding: 1px 6px;
  flex-shrink: 0;
}

.select-list > .select-option:hover {
  background: #353d4c;
}

.select-list > .select-option:checked {
  background: #3d8bfd;
  color: #10121a;
}

/*
 * Context menu: a pop-up of items opened on a widget
 * (`widgets/context_menu.rs`). An item with a submenu ends in
 * `.context-item-arrow` and is `:open` while its submenu is; an action item
 * given a shortcut shows it in `.context-item-shortcut`, pushed to the right
 * by the label's growth and dimmed as the arrow is; a separator is a
 * rule between items. A disabled item keeps the menu's background under the
 * pointer, so only what can be picked lights up. Up and down wrap at the
 * menu's ends, as a Windows menu's arrows do; a drop-down's list, a list box,
 * stops at them.
 */
.context-menu {
  min-width: 120px;
  nav-wrap: vertical;
}

.context-item {
  gap: 12px;
  padding: 1px 6px;
  flex-shrink: 0;
  align-items: center;
}

.context-menu > .context-item:hover,
.context-menu > .context-item:open {
  background: #353d4c;
}

.context-menu > .context-item:disabled {
  background: transparent;
  color: #7a8190;
}

.context-item-label {
  flex-grow: 1;
}

.context-item-arrow,
.context-item-shortcut {
  color: #7a8190;
}

.context-separator {
  height: 1px;
  margin: 2px 0;
  flex-shrink: 0;
  background: #4a5468;
}

/*
 * Dock: nested splits filling their parent, each pane clipping what it holds.
 * A pane's own look is the application's; what is here is only that it fills
 * the split that holds it.
 */
dock {
  flex-grow: 1;
  min-width: 0;
  min-height: 0;
}

.dock-pane {
  flex-grow: 1;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

/*
 * Inspector: one `.inspector-row` per reflected field — its label at the left
 * and the widget that edits it against the right edge — and a collapsing
 * header per composite field. A level of nesting is `.collapsing-body`'s own
 * padding and costs no rule here, which is what "depth is styling" means.
 *
 * `.inspector-field` is a class on the widget itself, so it outranks that
 * widget's type rule: a row's editor never shrinks, whatever the label does.
 */
inspector {
  flex-direction: column;
  gap: 2px;
  padding: 2px;
  background: #171a20;
  color: #e6e9ef;
}

.inspector-row {
  gap: 6px;
  padding: 1px 4px;
  align-items: center;
}

.inspector-label {
  flex-grow: 1;
  flex-shrink: 1;
}

.inspector-field {
  flex-shrink: 0;
}

/* One component of a vector row: its axis, then its own drag-value. */
.inspector-axis {
  gap: 2px;
  flex-shrink: 0;
  align-items: center;
}

.inspector-axis-label {
  color: #7a8190;
}

/*
 * A component's field is narrower than a row's own editor: three of them and
 * their axis labels share one row, and `drag-value`'s 48-pixel minimum would
 * put the last of them past the panel's edge.
 */
.inspector-axis > .inspector-field {
  min-width: 32px;
}

/* A composite field's header and body fill the panel rather than the row. */
.inspector-group {
  flex-shrink: 0;
}

/*
 * Menu and MenuSet: crcbl_ui::menu's panel. The menu is pixel art drawn at a
 * whole-number scale, so every length — the frame's bands, the padding, the
 * gaps, the font sizes, the groove and the handle — is `MenuStyle`'s, set
 * inline per scale. What is here is the skin: the frames, where they are
 * cut, which frame each state draws, and the colours.
 *
 * The frames are the pictures `crcbl_render::menu_skin` registers, bound by
 * these names when the menu is drawn. Their slice is the art's own inset,
 * four texels, which `crcbl_ui::menu::PANEL_INSETS` and `BUTTON_INSETS`
 * restate for the layout; `border-image-width` is left at its initial `1`,
 * so the frame's bands are the `border-width` the layout gives them.
 *
 * A row's state is the menu's model, not the pointer's: the selected or
 * hovered row is `:hover` and the row a key or a press holds is `:active`.
 *
 * The colours are linear light, as `MenuStyle::pixel_art` restates them.
 *
 * After the widget set, because the slider's rules here restyle its parts
 * and a later rule wins within a specificity tier.
 */
menu-screen {
  font-family: bitmap;
  justify-content: center;
  align-items: center;
}

/* Stretched over the framebuffer, and tinted by `color`: the art is white. */
.menu-scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: color(srgb-linear 0 0 0 / 0.66);
}

menu {
  flex-direction: column;
  flex-shrink: 0;
  border-image: url(menu-panel) 4 fill;
}

.menu-title {
  align-self: center;
  flex-shrink: 0;
  color: color(srgb-linear 1 0.94 0.55);
}

/* Lines under the title: the controls, a warning. They explain rather than
 * offer, so they are drawn in the hint's colour, below — or, for a line that
 * warns, in the console's warning amber. */
.menu-captions {
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.menu-items {
  flex-direction: column;
}

menu-item {
  align-items: center;
  border-image: url(menu-button-idle) 4 fill;
}

menu-item:hover {
  border-image-source: url(menu-button-hovered);
}

menu-item:active {
  border-image-source: url(menu-button-pressed);
}

.menu-label,
.menu-hint,
.menu-caption {
  flex-shrink: 0;
}

.menu-label {
  color: color(srgb-linear 0.94 0.95 1);
}

/* A key hint, a slider's value or a cycler's caption: dimmer than its label.
 * And a line under the title, which is no row's. */
.menu-hint,
.menu-caption {
  color: color(srgb-linear 0.62 0.64 0.82);
}

/* A caption in `CaptionTone::Warning`: amber, as the console's warnings are.
 * The node is `.menu-caption` too; this wins by coming after the rule above. */
.menu-caption-warning {
  color: color(srgb-linear 1 0.78 0.35);
}

/* What pushes a button row's hint against the row's right edge. */
.menu-spacer {
  flex-grow: 1;
}

/*
 * A slider row: a groove that takes the row's free width, drawn by the
 * tree's own slider, and a handle over it. The handle sits in a rail whose
 * two spaces share out the groove's free width by the value, so it travels
 * from flush left to flush right and never hangs over either end.
 */
.menu-groove {
  flex-grow: 1;
  align-self: center;
}

.menu-groove > slider.menu-slider {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 0;
  border-width: 0;
  background: color(srgb-linear 0.1 0.11 0.18);
}

.menu-groove > slider.menu-slider > .slider-fill {
  background: color(srgb-linear 0.42 0.46 0.72);
}

.menu-thumb-rail {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  align-items: center;
}

.menu-thumb-space {
  flex-basis: 0;
}

.menu-thumb {
  flex-shrink: 0;
  background: color(srgb-linear 0.94 0.95 1);
}

/*
 * ConsolePanel: crcbl_ui::console's drop-down. Like the menu, it is drawn at a
 * whole-number pixel-art scale, so every length — the panel's height and
 * padding, the well's border, the row and the font size — is `ConsoleStyle`'s,
 * set inline per scale, and so are the colours that style owns, the log's
 * per-level colour among them.
 *
 * What is here is the structure, and what an inline declaration cannot carry:
 * the Send button's three states — the widget set's own `button` rules above,
 * because an inline colour wins over every rule and so could have no `:hover`
 * — and the look of the text input's own parts, which the widget builds itself
 * and a caller's inline declarations never reach.
 *
 * The log box clips and packs its rows against its bottom edge: that is what
 * "newest at the bottom" is on the tree, and the rows that fall off the top are
 * the oldest ones the model offered.
 */
console-screen {
  font-family: bitmap;
}

console {
  flex-direction: column;
}

.console-log {
  flex-direction: column;
  justify-content: flex-end;
  flex-grow: 1;
  flex-basis: 0;
  overflow: hidden;
}

/* A row keeps its height however many of them the log offers. */
.console-line {
  flex-shrink: 0;
}

.console-row {
  align-items: center;
  flex-shrink: 0;
}

.console-field {
  flex-grow: 1;
  align-items: center;
  min-width: 0;
}

.console-prompt {
  flex-shrink: 0;
}

/*
 * The typed line takes the well's free width and is scrolled under its caret
 * by the tree, so a long line is clipped by the well rather than windowed by
 * the field.
 */
text-input.console-input {
  flex-grow: 1;
  min-width: 0;
  width: auto;
  padding: 0;
  border-width: 0;
  background: transparent;
  color: color(srgb-linear 0.94 0.95 1);
}

/*
 * The caret and the selection are parts the widget builds itself, so an inline
 * declaration cannot reach them. Their colours are here; the caret's *width*
 * is `ConsoleStyle::caret_width`, which grows with the scale, and the panel
 * writes it into a one-rule sheet of its own above this one. This width is
 * what a panel that has not written that sheet yet draws.
 */
text-input.console-input > .text-input-caret {
  width: 2px;
  background: color(srgb-linear 0.94 0.95 1);
}

text-input.console-input > .text-input-selection {
  background: color(srgb-linear 0.24 0.27 0.44);
}

button.console-send {
  flex-shrink: 0;
}

/* The candidates hang below the panel, lined up with the typed token. */
.console-completion {
  flex-direction: column;
}

.console-candidate {
  align-items: center;
  flex-shrink: 0;
}

.console-match,
.console-tail {
  flex-shrink: 0;
}