Repository navigation
Expand file tree
/
Copy pathstudio.css
More file actions
2079 lines (1785 loc) · 54.7 KB
/
Copy pathstudio.css
File metadata and controls
2079 lines (1785 loc) · 54.7 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
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
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* SPDX-FileCopyrightText: 2026 Anton Wiklund and Solid Memo contributors
*
* SPDX-License-Identifier: MIT
*/
/*
* Solid Memo Studio's own look (docs/studio.md, Layout), over the site's
* style.css. It ships with the Studio's chunk, and every rule holds only
* under :root[data-surface="studio"], which the Studio's shell sets while
* it is shown: Solid Memo shares the page, and keeps its own look. Its
* colors are style.css's tokens, so the theme and an instance's colors
* carry over.
*/
/* How densely rows and controls are packed: compact unless the status bar says comfortable, which is 44px, for touch. */
:root[data-surface="studio"] {
--s-control-h: 1.75rem;
--s-row-h: 1.75rem;
--s-cell-px: 0.5rem;
--s-cell-py: 0.2rem;
--s-font-size: 0.875rem;
}
:root[data-surface="studio"][data-density="comfortable"] {
--s-control-h: 2.75rem;
--s-row-h: 2.75rem;
--s-cell-px: 0.8rem;
--s-cell-py: 0.6rem;
--s-font-size: 1rem;
}
/* No paper behind a workspace. */
:root[data-surface="studio"] body {
min-height: 0;
background: var(--bg);
}
/*
* The Studio's screens: its tables, badges, filters, lists and forms.
* These rules weigh what they would without the scope (:where() adds
* none), so the workspace's own rules below, the density's among them,
* win over them.
*/
/* The Studio's tables, of decks and of cards: the deck's name (or the
card's front) as the row's heading, in the body's own type; the figures
beside it right-aligned, to compare. */
:where(:root[data-surface="studio"]) table.studio-list caption {
caption-side: top;
padding: 0.6rem 0.8rem;
text-align: left;
color: var(--text-muted);
}
:where(:root[data-surface="studio"]) table.studio-list tbody th {
background: none;
font-size: inherit;
font-weight: 600;
letter-spacing: normal;
text-transform: none;
color: var(--text);
overflow-wrap: anywhere;
white-space: normal;
min-width: 10rem;
}
:where(:root[data-surface="studio"]) table.studio-list .number {
text-align: right;
font-variant-numeric: tabular-nums;
}
/* Wide: it scrolls on its own, never the page, on a narrow screen. */
:where(:root[data-surface="studio"]) .studio-table {
overflow-x: auto;
margin-bottom: 1rem;
}
:where(:root[data-surface="studio"]) .studio-table table {
margin-bottom: 0;
}
:where(:root[data-surface="studio"]) table.studio-list thead th,
:where(:root[data-surface="studio"]) table.studio-list td {
white-space: nowrap;
}
/* A column's name is the button that sorts by it, in the header's type. */
:where(:root[data-surface="studio"]) table.studio-list button.sort {
min-height: 0;
padding: 0;
border: none;
background: none;
box-shadow: none;
font: inherit;
letter-spacing: inherit;
text-transform: inherit;
color: inherit;
}
:where(:root[data-surface="studio"]) table.studio-list [aria-sort="ascending"] button.sort::after {
content: " ▲";
}
:where(:root[data-surface="studio"]) table.studio-list [aria-sort="descending"] button.sort::after {
content: " ▼";
}
:where(:root[data-surface="studio"]) table.studio-list input[type="checkbox"] {
min-height: 0;
margin: 0;
}
:where(:root[data-surface="studio"]) .studio-badge {
display: inline-block;
margin-left: 0.5rem;
padding: 0.1rem 0.5rem;
border: 1px solid var(--border-strong);
border-radius: 999px;
font-size: 0.75rem;
font-weight: 400;
}
/* A deck's problems, as a link to its health; a newer library release, as a link to the library copies. */
:where(:root[data-surface="studio"]) .studio-badge-warning {
border-color: var(--warning-border);
background: var(--warning-soft);
color: var(--warning-text);
}
/* What a library upgrade would change, folded out under its summary. */
:where(:root[data-surface="studio"]) .studio-diff {
margin-top: 0.25rem;
}
:where(:root[data-surface="studio"]) .studio-diff h4 {
margin: 0.5rem 0 0.25rem;
font-size: 0.875rem;
}
:where(:root[data-surface="studio"]) .studio-health-list li {
margin-bottom: 0.25rem;
overflow-wrap: anywhere;
}
:where(:root[data-surface="studio"]) .studio-filter input {
display: block;
width: 100%;
max-width: 24rem;
margin-top: 0.25rem;
}
/* The card workbench: a card's sides wrap, as in Solid Memo's Browser;
its filters side by side while there is room; the selection's count. */
:where(:root[data-surface="studio"]) table.studio-cards tbody th,
:where(:root[data-surface="studio"]) table.studio-cards tbody td:nth-child(3) {
white-space: normal;
min-width: 10rem;
max-width: 24rem;
}
:where(:root[data-surface="studio"]) table.studio-cards tbody th p,
:where(:root[data-surface="studio"]) table.studio-cards tbody td p {
margin: 0;
}
:where(:root[data-surface="studio"]) .studio-filters {
display: flex;
flex-wrap: wrap;
gap: 0.75rem 1rem;
align-items: flex-end;
margin-bottom: 0.75rem;
}
:where(:root[data-surface="studio"]) .studio-filters label {
display: block;
}
:where(:root[data-surface="studio"]) .studio-filters .studio-filter {
flex: 1 1 14rem;
}
:where(:root[data-surface="studio"]) .studio-filters select {
display: block;
font: inherit;
min-height: 2.75rem;
margin-top: 0.25rem;
max-width: 100%;
padding: 0.55rem 0.8rem;
color: var(--text);
border: 1px solid var(--control-border);
border-radius: var(--radius);
background: var(--surface);
}
:where(:root[data-surface="studio"]) .studio-selection {
display: flex;
flex-wrap: wrap;
gap: 0.5rem 1rem;
align-items: center;
margin-bottom: 0.75rem;
}
:where(:root[data-surface="studio"]) .studio-selection p {
margin: 0;
}
/* A Studio screen's part that changes things (ReadOnlyScope): no frame of its own. */
:where(:root[data-surface="studio"]) .studio-scope {
border: 0;
padding: 0;
margin: 0;
min-width: 0;
}
:where(:root[data-surface="studio"]) .studio-preview {
margin: 0.75rem 0;
padding: 0.75rem;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--surface);
overflow-wrap: anywhere;
}
:where(:root[data-surface="studio"]) .studio-preview h4 {
margin: 0 0 0.5rem;
}
:where(:root[data-surface="studio"]) .studio-preview del {
color: var(--text-muted);
}
:where(:root[data-surface="studio"]) .studio-preview ins {
text-decoration: none;
font-weight: 600;
}
/* An author of a deck: the name's field, and its Remove button beside it. */
:where(:root[data-surface="studio"]) .studio-author {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 0.5rem;
margin-bottom: 0.6rem;
}
:where(:root[data-surface="studio"]) .studio-author input {
flex: 1 1 12rem;
min-width: 0;
margin-bottom: 0;
}
/* A card's schedule, a section per direction: its due day to set, the
field and its button side by side while they fit. */
:where(:root[data-surface="studio"]) .studio-schedule section {
margin-bottom: 1.25rem;
}
:where(:root[data-surface="studio"]) .studio-reschedule {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
}
:where(:root[data-surface="studio"]) .studio-reschedule label {
flex-basis: 100%;
}
:where(:root[data-surface="studio"]) .studio-reschedule input {
max-width: 100%;
margin-bottom: 0;
}
/* A card's answers: one that forgot the card is marked, as the
statistics mark a day's forgotten answers. */
:where(:root[data-surface="studio"]) table.studio-list tr.forgotten td:nth-child(3) {
color: var(--danger);
}
/* A deck's schedule: its charts' sections apart, its leeches a list. */
:where(:root[data-surface="studio"]) .studio-insight .bar-chart {
margin: 0 0 1.25rem;
}
:where(:root[data-surface="studio"]) .studio-leeches {
margin: 0 0 0.75rem;
padding-left: 1.5rem;
}
:where(:root[data-surface="studio"]) .studio-leeches li {
margin: 0.35rem 0;
}
/* A course's chapters, each with its state and what can be done with it. */
:where(:root[data-surface="studio"]) .studio-chapters {
margin: 0 0 0.75rem;
padding-left: 1.5rem;
}
:where(:root[data-surface="studio"]) .studio-chapters li {
margin: 0.35rem 0;
}
/* A deck's name, one per language. */
:where(:root[data-surface="studio"]) .studio-names {
list-style: none;
margin: 0 0 0.75rem;
padding: 0;
}
:where(:root[data-surface="studio"]) .studio-names li {
margin: 0.25rem 0;
}
/* The Studio's tabs: links in a row, the one shown marked. */
:where(:root[data-surface="studio"]) .studio-tabs ul {
display: flex;
flex-wrap: wrap;
gap: 0.25rem 1rem;
list-style: none;
padding: 0;
margin: 0.75rem 0;
border-bottom: 1px solid var(--border);
}
:where(:root[data-surface="studio"]) .studio-tabs a {
display: inline-block;
padding: 0.4rem 0.1rem;
text-decoration: none;
}
/* The tab shown, or the one the page shown is under (a card under Cards). */
:where(:root[data-surface="studio"]) .studio-tabs a[aria-current] {
font-weight: 600;
border-bottom: 3px solid var(--primary);
}
/* A draft's listing preview (ListingPreviewScreen.tsx): the
library's row and page as learners will see them, framed as a picture,
nothing in them to press. */
:where(:root[data-surface="studio"]) .listing-preview {
margin: 0.5rem 0 1rem;
padding: 0.75rem;
border: 1px dashed var(--border-strong);
border-radius: var(--radius);
pointer-events: none;
}
/* The release check's problems: each subject, then its problems under it. */
:where(:root[data-surface="studio"]) .release-problems > li > ul {
margin: 0.15rem 0 0.5rem;
}
/*
* A release's themes (ReleaseMetadataScreen.tsx): its groups, unframed
* in its frame; the topics wrap as the library's do, each narrower one
* on a line under its broader one, indented.
*/
:where(:root[data-surface="studio"]) .release-themes fieldset {
border: none;
margin: 0.5rem 0 0;
padding: 0;
}
:where(:root[data-surface="studio"]) .release-themes ul {
display: flex;
flex-wrap: wrap;
gap: 0.25rem 1rem;
margin: 0;
padding: 0;
list-style: none;
}
:where(:root[data-surface="studio"]) .release-themes li:has(> ul) {
flex-basis: 100%;
}
:where(:root[data-surface="studio"]) .release-themes li > ul {
padding-inline-start: 1.5rem;
}
:where(:root[data-surface="studio"]) .release-themes label.checkbox-option {
display: inline-flex;
align-items: center;
gap: 0.35rem;
}
/* A checkbox keeps its size when its label wraps. */
:where(:root[data-surface="studio"]) .release-themes label.checkbox-option input {
flex-shrink: 0;
}
/* A course draft's outline (DraftOutline.tsx): the deck list's
rows, a step's name with the first words of its theory and its
questions under it, none with an icon to indent past. */
:where(:root[data-surface="studio"]) .draft-outline .deck-open {
padding-left: 0.4rem;
text-indent: 0;
}
:where(:root[data-surface="studio"]) .draft-outline .outline-step-text {
grid-column: 1;
display: flex;
flex-direction: column;
gap: 0.15rem;
min-width: 0;
}
:where(:root[data-surface="studio"]) .draft-outline .outline-step-text > .hint {
padding-left: 0.4rem;
overflow-wrap: anywhere;
}
:where(:root[data-surface="studio"]) .draft-outline .outline-questions {
margin: 0.25rem 0 0;
padding-left: 1.6rem;
font-size: 0.9rem;
}
:where(:root[data-surface="studio"]) .draft-order li {
margin: 0.25rem 0;
}
/*
* The page is a grid the window's height: the header across it; the
* sidebar, then the main content, then the aside (while it is beside it,
* data-aside), each scrolling on its own; the dock under the main content
* and the aside; and at the foot the status bar beside the site's footer.
* Nothing is capped to a column. The sidebar or the aside hidden, the
* main content takes its room; the dock hidden, its row is empty.
*/
:root[data-surface="studio"] #app {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto auto;
grid-template-rows: auto minmax(0, 1fr) auto auto;
grid-template-areas:
"header header header header"
"sidebar main main main"
"sidebar dock dock dock"
"status status footer footer";
height: 100dvh;
min-height: 0;
}
:root[data-surface="studio"][data-aside] #app {
grid-template-areas:
"header header header header"
"sidebar main main aside"
"sidebar dock dock dock"
"status status footer footer";
}
:root[data-surface="studio"] header.site-header {
grid-area: header;
}
:root[data-surface="studio"] .studio-sidebar {
grid-area: sidebar;
/*
* Beside the main content, the containing block of what is placed
* absolutely in it, so its own scrolling clips that, as main's does
* (below). As a drawer, on a narrow screen, it is fixed instead: this
* comes before that rule so as not to undo it.
*/
position: relative;
}
:root[data-surface="studio"] main.workspace {
grid-area: main;
}
:root[data-surface="studio"] .studio-aside {
grid-area: aside;
}
:root[data-surface="studio"] .studio-dock {
grid-area: dock;
}
:root[data-surface="studio"] .studio-status-bar {
grid-area: status;
}
:root[data-surface="studio"] .site-footer {
grid-area: footer;
}
:root[data-surface="studio"] header.site-header,
:root[data-surface="studio"] main.workspace {
max-width: none;
margin: 0;
}
/* Narrow: the dock, the status bar and the site's footer under the main content, and the sidebar a drawer over the page (NARROW in workspaceLayout.ts). */
@media (max-width: 48rem) {
:root[data-surface="studio"] #app {
grid-template-columns: minmax(0, 1fr);
grid-template-rows: auto minmax(0, 1fr) auto auto auto;
grid-template-areas:
"header"
"main"
"dock"
"status"
"footer";
}
:root[data-surface="studio"] .studio-sidebar {
position: fixed;
inset: 0 auto 0 0;
z-index: 20;
width: min(18rem, 85vw);
box-shadow: var(--shadow);
}
}
/*
* The header as one row: the sidebar's button, the masthead (the name,
* who is signed in, Log out), the open instance, then the theme and the
* language list, then the way back to Solid Memo. On a narrow screen it is
* two: the button, the name and Log out; then the rest.
*/
:root[data-surface="studio"] header.site-header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.25rem 0.75rem;
min-height: 2.5rem;
padding: 0.25rem 0.75rem;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
:root[data-surface="studio"] .studio-sidebar-toggle {
order: -1;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2rem;
min-height: 2rem;
padding: 0.25rem;
color: var(--text);
background: none;
border: 1px solid transparent;
border-radius: var(--radius-sm);
box-shadow: none;
}
:root[data-surface="studio"] .studio-sidebar-toggle:hover {
background: var(--surface-hover);
}
:root[data-surface="studio"] .studio-sidebar-toggle[aria-expanded="true"] {
border-color: var(--border);
}
/* The open instance, a menu of the user's others: a long name wraps
rather than being cut short. */
:root[data-surface="studio"] .studio-switcher {
max-width: 14rem;
min-height: 2rem;
padding: 0.15rem 0.6rem;
font-size: 0.875rem;
overflow-wrap: anywhere;
color: var(--text);
background: var(--surface);
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
box-shadow: none;
}
:root[data-surface="studio"] .studio-switcher::after {
content: " ▾";
color: var(--text-muted);
}
:root[data-surface="studio"] .top-bar {
order: 1;
padding-top: 0;
}
/* The language list as tall and square as the header's other controls. */
:root[data-surface="studio"] .language-selector select {
min-height: var(--s-control-h);
padding: 0.15rem 0.4rem;
font-size: var(--s-font-size);
border-color: var(--border-strong);
border-radius: var(--radius-sm);
}
:root[data-surface="studio"] header.site-header .header-link {
order: 2;
margin: 0;
font-size: 0.875rem;
}
/* The aside's button, at the header's end, as the sidebar's is at its start. */
:root[data-surface="studio"] .studio-aside-toggle {
order: 3;
}
@media (max-width: 48rem) {
/* The masthead's name and Log out on the first row, beside the button; who is signed in has no room there, and is left out. */
:root[data-surface="studio"] .masthead {
flex-wrap: nowrap;
}
:root[data-surface="studio"] .masthead .session-line {
display: none;
}
:root[data-surface="studio"] .studio-switcher {
max-width: 10rem;
}
:root[data-surface="studio"] header.site-header .header-link {
margin-left: auto;
}
}
/* The masthead, flat in the header: no navy, no blobs, no tilt. */
:root[data-surface="studio"] .masthead {
--link-hover-bg: inherit;
--link-hover-border: inherit;
--logo-height: 1.75rem;
flex: 1 1 auto;
gap: 0.75rem;
margin: 0;
padding: 0;
color: var(--text);
background: none;
border: none;
border-radius: 0;
box-shadow: none;
}
:root[data-surface="studio"] .masthead-title {
flex: 1 1 auto;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: baseline;
gap: 0 0.75rem;
padding-left: calc(var(--logo-height) * 1.5 + 0.5rem);
}
:root[data-surface="studio"] .masthead img.logo,
:root[data-surface="studio"] .masthead a.brand:hover img.logo {
border: 1px solid var(--border);
border-radius: var(--radius-sm);
box-shadow: none;
transform: translateY(-50%);
}
:root[data-surface="studio"] .masthead h1 {
font-size: 1rem;
}
:root[data-surface="studio"] .wordmark,
:root[data-surface="studio"] .masthead a.brand:hover .wordmark {
transform: none;
animation: none;
}
/*
* Who is signed in takes the room the row has left, cut short to keep
* the header one row in a language of longer words (or in larger text),
* the whole line its title; given less than 12rem, the row wraps instead.
*/
:root[data-surface="studio"] .session-line {
flex: 1 1 auto;
min-width: 12rem;
margin: 0;
overflow: hidden;
color: var(--text-muted);
white-space: nowrap;
text-overflow: ellipsis;
contain: inline-size;
}
:root[data-surface="studio"] .session-line a:hover {
color: var(--link);
}
/*
* With the account's link in it, the link is what is cut short, inside
* a box of its own: its box would otherwise run on under Log out, hidden
* but still covering the button's target (WCAG 2.5.8). The line keeps
* its spaces as its language writes them ("{name}(으)로 로그인됨").
*/
:root[data-surface="studio"] .session-line:has(a) {
display: flex;
white-space: pre;
}
:root[data-surface="studio"] .session-line a {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
:root[data-surface="studio"] .masthead button {
color: var(--text);
background: var(--surface);
border-color: var(--border-strong);
box-shadow: none;
}
:root[data-surface="studio"] .masthead button:hover:not(:disabled),
:root[data-surface="studio"] .masthead button:focus-visible {
background: var(--surface-hover);
}
:root[data-surface="studio"] .masthead :focus-visible,
:root[data-surface="studio"] .masthead a.brand:focus-visible img.logo {
outline-color: var(--primary);
}
:root[data-surface="studio"] main.workspace {
/*
* The containing block of what is placed absolutely in it: the text
* kept for screen readers (.visually-hidden) and the empty error and
* status lines. Without it they are placed against the page, outside
* main's own scrolling, and make the page wider and taller than the
* window, which a phone then zooms out to fit, the grid filling only
* its top-left corner.
*/
position: relative;
padding: 0.5rem 1rem 1.5rem;
overflow: auto;
font-size: var(--s-font-size);
}
/* Calm headings, in the body's type: no display font, tilt or stamp. */
:root[data-surface="studio"] :is(h1, h2, h3) {
font-family: inherit;
font-weight: 600;
letter-spacing: 0;
word-spacing: normal;
text-shadow: none;
transform: none;
animation: none;
}
/* Korean text in a heading too (style.css gives it the display font). */
:root[data-surface="studio"] :is(h1, h2, h3) * {
font-family: inherit;
}
:root[data-surface="studio"] main h2 {
font-size: 1.25rem;
margin-bottom: 0.5rem;
}
:root[data-surface="studio"] main h3 {
font-size: 1rem;
}
/* Sections are flat and bordered, and come in without a pop. */
:root[data-surface="studio"] main section {
padding: 0.75rem 1rem;
margin-bottom: 0.75rem;
border-radius: var(--radius-sm);
box-shadow: none;
animation: none;
}
:root[data-surface="studio"]
:is(.breadcrumbs, .instance-list li, .deck-list li, .card-table tbody tr) {
animation: none;
}
:root[data-surface="studio"] .breadcrumbs ol {
margin-bottom: 0.5rem;
font-size: 0.8125rem;
}
/* Controls as tall as the density says; a sort button, a switch and a picture keep their own size. */
:root[data-surface="studio"]
main
:is(button, a.button, select, input:not([type="radio"], [type="checkbox"])):not(
.sort,
.switch,
.picture-zoom-button
),
:root[data-surface="studio"] :is(.masthead, .studio-status-bar) button {
min-height: var(--s-control-h);
padding: 0.15rem 0.6rem;
font-size: var(--s-font-size);
border-radius: var(--radius-sm);
}
/* A text and its language in one box (LangTextField): as tall as the
density says, the box rounded as the other controls; inside it the
text square, and the button rounded only where the box is. The rule
above would round them all: these weigh as much or more (the button
matched as it does, `:is(button, a.button)`) and come after it. */
:root[data-surface="studio"] main .text-with-language {
--joined-radius: var(--radius-sm);
}
:root[data-surface="studio"]
main
.text-with-language
> :is(button, input:not([type="radio"], [type="checkbox"])) {
border-radius: 0;
}
:root[data-surface="studio"] main .text-with-language > input + :is(button, a.button) {
border-start-end-radius: calc(var(--joined-radius) - 1px);
border-end-end-radius: calc(var(--joined-radius) - 1px);
}
:root[data-surface="studio"] main .text-with-language > textarea + :is(button, a.button) {
border-end-start-radius: calc(var(--joined-radius) - 1px);
border-end-end-radius: calc(var(--joined-radius) - 1px);
}
:root[data-surface="studio"] main .row-menu {
min-width: var(--s-control-h);
}
/* A button stays where it is under the pointer. */
:root[data-surface="studio"] :is(button, a.button):hover:not(:disabled, [aria-disabled="true"]) {
transform: none;
}
/*
* Tables: rows as tall as the density says, and the header row kept in
* sight while the main content scrolls. A table's wrapper does not
* scroll on its own here (it would hold the header), so the main
* content scrolls sideways too; but on a narrow screen a wide table
* scrolls in its own box, its header row with it.
*/
:root[data-surface="studio"] main .studio-table {
overflow: visible;
}
@media (max-width: 48rem) {
:root[data-surface="studio"] main .studio-table {
overflow-x: auto;
}
}
:root[data-surface="studio"] main table {
border-collapse: collapse;
border-radius: 0;
overflow: visible;
}
:root[data-surface="studio"] main :is(th, td) {
height: var(--s-row-h);
padding: var(--s-cell-py) var(--s-cell-px);
}
:root[data-surface="studio"] main td.clickable {
padding: 0;
}
:root[data-surface="studio"] main td.clickable a {
padding: var(--s-cell-py) var(--s-cell-px);
}
/* Its line drawn as a shadow: a collapsed border stays behind when the row sticks. */
:root[data-surface="studio"] main thead th {
position: sticky;
top: 0;
z-index: 1;
box-shadow: inset 0 -1px 0 var(--border);
}
/*
* A DataTable (shell/DataTable.tsx): its first column (the checkbox that
* selects a row, then the row's name) stays in sight as the main content
* scrolls sideways, on the table's own color. The cursor's row has a
* bar at its start and the hover's color; a row selected, the primary's
* soft tint; the row shown beside the table, both bar and tint.
*/
:root[data-surface="studio"] main .studio-data-table {
--s-select-w: 2rem;
}
:root[data-surface="studio"] main .studio-data-table tr > :first-child,
:root[data-surface="studio"] main .studio-data-table.selectable tr > :nth-child(2) {
position: sticky;
left: 0;
z-index: 1;
}
:root[data-surface="studio"] main .studio-data-table.selectable tr > :first-child {
width: var(--s-select-w);
min-width: var(--s-select-w);
max-width: var(--s-select-w);
}
:root[data-surface="studio"] main .studio-data-table.selectable tr > :nth-child(2) {
left: var(--s-select-w);
}
/* Where the header row and the first column meet, over both. */
:root[data-surface="studio"] main .studio-data-table thead tr > :first-child,
:root[data-surface="studio"] main .studio-data-table.selectable thead tr > :nth-child(2) {
z-index: 2;
}
/* Below the cursor's and the selection's colors, which cover the first column too. */
:root[data-surface="studio"] main .studio-data-table tbody tr > :where(:first-child),
:root[data-surface="studio"]
main
.studio-data-table:where(.selectable)
tbody
tr
> :where(:nth-child(2)) {
background: var(--surface);
}
:root[data-surface="studio"] main .studio-data-table tbody tr.cursor > * {
background: var(--surface-hover);
}
:root[data-surface="studio"] main .studio-data-table tbody tr:is(.selected, [aria-current]) > * {
background: var(--primary-soft);
}
:root[data-surface="studio"]
main
.studio-data-table
tbody
tr:is(.cursor, [aria-current])
> :first-child {
box-shadow: inset 3px 0 0 var(--primary);
}
/* A table's Columns menu, at the end of the row above it. */
:root[data-surface="studio"] main .studio-table-tools {
display: flex;
justify-content: flex-end;
margin-bottom: 0.25rem;
}
/* Home's views: a row of tabs, the one shown pressed, each with its count. */
:root[data-surface="studio"] main .studio-views {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-bottom: 0.5rem;
}
:root[data-surface="studio"] main .studio-views button[aria-pressed="true"] {
color: var(--text);
background: var(--primary-soft);
border-color: var(--primary);
}
:root[data-surface="studio"] main .studio-views .studio-count {
color: var(--text-muted);
font-variant-numeric: tabular-nums;
}
/*
* A table's filters (the workbench's, Home's, a draft's cards'): one row,
* wrapping only when the screen is narrow, each label small and beside
* its field; the counts at the row's end.
*/
:root[data-surface="studio"] main .studio-filters {
gap: 0.25rem 0.75rem;
align-items: center;
margin-bottom: 0.5rem;
}
:root[data-surface="studio"] main .studio-filters label {
display: inline-flex;
align-items: center;
gap: 0.35rem;
font-size: 0.8125rem;
color: var(--text-muted);
}
:root[data-surface="studio"] main .studio-filters .studio-filter {
flex: 1 1 12rem;
max-width: 24rem;
}
:root[data-surface="studio"] main .studio-filters :is(select, input) {
display: inline-block;
margin-top: 0;
color: var(--text);
}
:root[data-surface="studio"] main .studio-filters .studio-filter input {
flex: 1;
width: auto;
min-width: 0;
}
:root[data-surface="studio"] main .studio-filters > p {
margin: 0;
font-size: 0.8125rem;
}
:root[data-surface="studio"] main .studio-filters > p:first-of-type {