@oxide/design-system 2.2.7--canary.f2f7829.0 → 2.2.7--canary.339d083.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.
@@ -0,0 +1,858 @@
1
+ /*
2
+ * This Source Code Form is subject to the terms of the Mozilla Public
3
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
5
+ *
6
+ * Copyright Oxide Computer Company
7
+ */
8
+
9
+ @layer utilities {
10
+ .text-mono-code {
11
+ @apply text-[0.825em] !normal-case;
12
+ font-feature-settings: 'calt' 0;
13
+ letter-spacing: 0;
14
+ }
15
+
16
+ .accent-link {
17
+ @apply text-accent-secondary hover:text-accent;
18
+ text-decoration: underline;
19
+ text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
20
+ }
21
+
22
+ .link-with-underline {
23
+ @apply text-default hover:text-raise;
24
+ text-decoration: underline;
25
+ text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
26
+ }
27
+ }
28
+
29
+ @layer components {
30
+ .asciidoc-body {
31
+ .line-through {
32
+ text-decoration: line-through;
33
+ }
34
+
35
+ .quoteblock {
36
+ @apply mb-8 mt-8 border-l pl-[1.6rem] text-secondary border-default;
37
+ }
38
+
39
+ .quoteblock p {
40
+ @apply text-secondary;
41
+ }
42
+
43
+ .quoteblock .attribution {
44
+ @apply mt-8 text-raise;
45
+ }
46
+
47
+ .attribution cite {
48
+ @apply block;
49
+ }
50
+
51
+ .admonitionblock .quoteblock {
52
+ @apply mb-2 mt-2 pl-[0.75rem] border-success-secondary;
53
+ }
54
+
55
+ .admonition-content .paragraph {
56
+ @apply mb-1 last:mb-0;
57
+ }
58
+
59
+ .admonition-content > div:first-of-type {
60
+ @apply normal-case text-sans-semi-md;
61
+ }
62
+
63
+ .imageblock img {
64
+ @apply mx-auto h-auto w-auto w-full rounded-lg border border-tertiary object-contain;
65
+ max-height: max(500px, 75vh);
66
+ }
67
+
68
+ span img {
69
+ @apply inline;
70
+ }
71
+
72
+ img.transparent-dark {
73
+ @apply bg-secondary;
74
+ }
75
+
76
+ p a {
77
+ @apply text-accent-secondary hover:text-accent;
78
+ overflow-wrap: break-word;
79
+ word-wrap: break-word;
80
+
81
+ text-decoration: underline;
82
+ text-decoration-color: var(--content-accent-tertiary);
83
+ }
84
+
85
+ /* Use semi-bold for strong */
86
+ strong {
87
+ @apply font-[500] text-raise;
88
+ }
89
+
90
+ a strong {
91
+ @apply text-accent-secondary;
92
+ }
93
+
94
+ h2,
95
+ h3,
96
+ h4,
97
+ h5 {
98
+ @apply relative mb-3 mt-10 text-raise;
99
+ }
100
+
101
+ /* Removes top spacing from header if it is the first element */
102
+ &#content > .sect1:first-of-type > h1:nth-child(1),
103
+ &#content > .sect1:first-of-type > h2:nth-child(1),
104
+ &#content > .sect1:first-of-type > h3:nth-child(1),
105
+ &#content > .sect1:first-of-type > h4:nth-child(1),
106
+ &#content > .sect1:first-of-type > h5:nth-child(1) {
107
+ @apply mt-0;
108
+ }
109
+
110
+ h1 a,
111
+ h2 a,
112
+ h3 a,
113
+ h4 a,
114
+ h5 a {
115
+ @apply inline text-raise;
116
+ }
117
+
118
+ h1[data-sectnum]:before,
119
+ h2[data-sectnum]:before,
120
+ h3[data-sectnum]:before,
121
+ h4[data-sectnum]:before,
122
+ h5[data-sectnum]:before {
123
+ @apply bottom-0 mr-2 inline-block text-tertiary 800:absolute 800:-left-[72px] 800:mr-0 800:w-[60px] 800:text-right 800:text-sans-lg;
124
+ }
125
+
126
+ h3[data-sectnum]:before,
127
+ h2[data-sectnum]:before {
128
+ @apply 800:bottom-[2px];
129
+ }
130
+
131
+ h2 {
132
+ @apply text-sans-2xl;
133
+ }
134
+
135
+ h3 {
136
+ @apply text-sans-xl;
137
+ }
138
+
139
+ h4,
140
+ h5 {
141
+ @apply mb-2 mt-8 text-sans-lg text-raise;
142
+ }
143
+
144
+ .anchor,
145
+ .sectionanchor {
146
+ position: absolute;
147
+ margin-top: calc(var(--header-height) * -1 - 20px);
148
+ visibility: hidden;
149
+ user-select: none;
150
+ }
151
+
152
+ .dlist dt {
153
+ @apply text-sans-lg text-raise;
154
+ }
155
+
156
+ .dlist dt:after {
157
+ content: ':';
158
+ @apply text-sans-lg text-tertiary;
159
+ }
160
+
161
+ {
162
+ @apply text-sans-lg;
163
+ }
164
+
165
+ /* Fix overflow text in mermaid */
166
+ figure svg {
167
+ line-height: 1 !important;
168
+ }
169
+
170
+ p {
171
+ @apply mb-[1.25rem] !leading-[1.5] text-sans-lg 800:mb-3;
172
+ }
173
+
174
+ ul li,
175
+ ol li {
176
+ @apply mt-[0.325rem];
177
+ }
178
+
179
+ ul,
180
+ ol {
181
+ @apply mb-3 list-disc text-mono-sm;
182
+ }
183
+
184
+ li::marker,
185
+ ol::marker {
186
+ color: color-mix(in srgb, currentColor 60%, transparent);
187
+ }
188
+
189
+ ul p,
190
+ ol p {
191
+ @apply normal-case;
192
+ }
193
+
194
+ ul ul,
195
+ ul ol,
196
+ ol ol,
197
+ ol ul {
198
+ @apply mb-0;
199
+ }
200
+
201
+ ul ul li {
202
+ list-style-type: circle;
203
+ }
204
+
205
+ ul ul ul li {
206
+ list-style-type: square;
207
+ }
208
+
209
+ ul ul ul ul li {
210
+ list-style-type: disc;
211
+ }
212
+
213
+ ul {
214
+ @apply list-disc;
215
+ }
216
+
217
+ ol {
218
+ @apply list-decimal;
219
+ }
220
+
221
+ ul,
222
+ ol {
223
+ @apply list-inside 800:list-outside;
224
+ }
225
+
226
+ ul:first-of-type,
227
+ .github-markdown > ul {
228
+ @apply 800:ml-4;
229
+ }
230
+
231
+ ol:first-of-type,
232
+ .github-markdown > ol {
233
+ @apply 800:ml-6;
234
+ }
235
+
236
+ .tableblock ul,
237
+ .tableblock ol {
238
+ @apply list-inside;
239
+ }
240
+
241
+ .quoteblock ul,
242
+ .quoteblock ol {
243
+ @apply list-inside;
244
+ }
245
+
246
+ .ulist .ulist,
247
+ .ulist .olist,
248
+ .olist .ulist,
249
+ .olist .olist {
250
+ @apply ml-[2rem] 800:ml-2;
251
+ }
252
+
253
+ .exampleblock ul,
254
+ .exampleblock ol {
255
+ @apply list-inside;
256
+ }
257
+
258
+ ul p,
259
+ ol p {
260
+ @apply inline;
261
+ }
262
+
263
+ p {
264
+ @apply text-default;
265
+ }
266
+
267
+ .arabic {
268
+ list-style-type: decimal;
269
+ }
270
+
271
+ .loweralpha {
272
+ list-style-type: lower-alpha;
273
+ }
274
+
275
+ .lowerroman {
276
+ list-style-type: lower-roman;
277
+ }
278
+
279
+ .upperalpha {
280
+ list-style-type: upper-alpha;
281
+ }
282
+
283
+ .upperroman {
284
+ list-style-type: upper-roman;
285
+ }
286
+
287
+ ol p {
288
+ @apply normal-case text-default;
289
+ }
290
+
291
+ .inline-code {
292
+ @apply text-secondary;
293
+ @apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] text-[0.825em] bg-raise border-secondary;
294
+ }
295
+
296
+ p code,
297
+ h1 code,
298
+ h2 code,
299
+ h3 code,
300
+ h4 code,
301
+ h5 code,
302
+ .title code {
303
+ @apply text-[0.825em] text-default;
304
+ @apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] bg-raise border-secondary;
305
+ }
306
+
307
+ p a code {
308
+ @apply text-accent-secondary;
309
+ }
310
+
311
+ table p code {
312
+ @apply break-normal;
313
+ }
314
+
315
+ .admonitionblock p code {
316
+ @apply border-none text-inverse bg-success;
317
+ }
318
+
319
+ pre {
320
+ @apply rounded-lg border px-[1.25rem] py-[1rem] border-secondary 800:px-[1.75rem] 800:py-[1.5rem];
321
+ @apply overflow-x-auto !text-[13px] text-mono-code;
322
+ }
323
+
324
+ code {
325
+ font-feature-settings: 'calt' 0;
326
+ }
327
+
328
+ .listingblock .content {
329
+ @apply relative;
330
+ }
331
+
332
+ .listingblock pre:not(.highlight) {
333
+ @apply text-default;
334
+ }
335
+
336
+ .listingblock code[data-lang]:before {
337
+ @apply absolute right-2 top-2 block text-mono-xs text-secondary;
338
+ content: attr(data-lang);
339
+ }
340
+
341
+ pre .conum[data-value] {
342
+ @apply relative -top-[0.125rem] inline-block h-[1rem] min-w-[1rem] rounded-full text-center not-italic text-mono-xs text-secondary bg-raise;
343
+ }
344
+
345
+ pre .conum[data-value]:after {
346
+ @apply pl-[1px];
347
+ content: attr(data-value);
348
+ }
349
+
350
+ pre .conum[data-value] + b {
351
+ @apply hidden;
352
+ }
353
+
354
+ .exampleblock {
355
+ @apply overflow-x-auto rounded-lg px-[1.5rem] py-[1.25rem] bg-raise;
356
+ }
357
+
358
+ .exampleblock p {
359
+ @apply mb-2 text-sans-md;
360
+ }
361
+
362
+ .exampleblock .content,
363
+ .exampleblock .paragraph:last-of-type p {
364
+ @apply m-0;
365
+ }
366
+
367
+ .exampleblock > .content {
368
+ @apply my-[1rem];
369
+ }
370
+
371
+ .admonitionblock {
372
+ @apply rounded-lg border text-success bg-success-secondary border-success-tertiary;
373
+ @apply my-[1.5rem] flex px-3 py-3;
374
+ }
375
+
376
+ .admonition-content p {
377
+ @apply text-[currentColor];
378
+ }
379
+
380
+ .admonitionblock a {
381
+ text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
382
+ }
383
+
384
+ .admonitionblock strong {
385
+ @apply text-success;
386
+ }
387
+
388
+ .admonitionblock.caution strong,
389
+ .admonitionblock.important strong {
390
+ @apply text-notice;
391
+ }
392
+
393
+ .admonitionblock.caution .quoteblock {
394
+ @apply border-notice-secondary;
395
+ }
396
+
397
+ .admonitionblock.warning .quoteblock {
398
+ @apply border-destructive-secondary;
399
+ }
400
+
401
+ .admonitionblock.warning strong {
402
+ @apply text-destructive;
403
+ }
404
+
405
+ .admonitionblock.tip strong {
406
+ color: var(--base-purple-800);
407
+ }
408
+
409
+ .admonitionblock,
410
+ .admonitionblock blockquote {
411
+ @apply text-success;
412
+ }
413
+
414
+ .admonitionblock.tip,
415
+ .admonitionblock.tip blockquote {
416
+ background-color: var(--base-purple-200);
417
+ color: var(--base-purple-800);
418
+ border-color: var(--base-purple-400);
419
+ }
420
+
421
+ .admonitionblock.caution,
422
+ .admonitionblock.important,
423
+ .admonitionblock.caution blockquote,
424
+ .admonitionblock.important blockquote {
425
+ @apply text-notice bg-notice-secondary border-notice-tertiary;
426
+ }
427
+
428
+ .admonitionblock.warning,
429
+ .admonitionblock.warning blockquote {
430
+ @apply text-destructive bg-destructive-secondary border-destructive-tertiary;
431
+ }
432
+
433
+ .admonitionblock.caution,
434
+ .admonitionblock.important {
435
+ @apply text-notice;
436
+ }
437
+
438
+ .admonitionblock.warning {
439
+ @apply text-destructive;
440
+ }
441
+
442
+ .admonitionblock.tip {
443
+ color: var(--base-purple-800);
444
+ }
445
+
446
+ .admonitionblock.caution p code,
447
+ .admonitionblock.important p code {
448
+ @apply bg-notice;
449
+ }
450
+
451
+ .admonitionblock.warning p code {
452
+ @apply bg-error;
453
+ }
454
+
455
+ .admonitionblock.tip p code {
456
+ background-color: var(--base-purple-800);
457
+ }
458
+
459
+ .admonitionblock a {
460
+ @apply underline;
461
+ }
462
+
463
+ .admonitionblock a {
464
+ @apply text-success;
465
+ }
466
+
467
+ .admonitionblock.caution a,
468
+ .admonitionblock.important a {
469
+ @apply text-notice;
470
+ }
471
+
472
+ .admonitionblock.warning a {
473
+ @apply text-destructive;
474
+ }
475
+
476
+ .admonitionblock.tip a {
477
+ color: var(--base-purple-800);
478
+ }
479
+
480
+ .admonition-icon svg {
481
+ @apply mr-2 mt-0.5 h-3 w-3;
482
+ }
483
+
484
+ .admonition-content {
485
+ @apply text-sans-md 800:mr-[1.25rem];
486
+ }
487
+
488
+ .admonition-content p {
489
+ @apply mb-0 text-sans-md;
490
+ }
491
+
492
+ .imageblock,
493
+ .table-wrapper {
494
+ @apply my-6;
495
+ }
496
+
497
+ .imageblock.inlineimage {
498
+ @apply my-3;
499
+ }
500
+
501
+ table.tableblock table.tableblock {
502
+ @apply my-2;
503
+ }
504
+
505
+ table.tableblock .imageblock {
506
+ @apply my-0;
507
+ }
508
+
509
+ .imageblock .title {
510
+ @apply mt-3 max-w-full text-center not-italic text-mono-xs text-secondary;
511
+ }
512
+
513
+ img.wide {
514
+ max-width: none;
515
+ width: calc(100% / 8 * 10);
516
+ margin-left: calc(100% / 8 * -1);
517
+ }
518
+
519
+ sup.footnote {
520
+ @apply text-mono-xs text-secondary;
521
+ }
522
+
523
+ sup.footnote a {
524
+ padding-top: calc(var(--header-height) + 20px);
525
+ margin-top: calc(var(--header-height) * -1 - 20px);
526
+ }
527
+
528
+ .imageblock,
529
+ .literalblock,
530
+ .listingblock,
531
+ .stemblock,
532
+ .videoblock,
533
+ .exampleblock {
534
+ @apply my-[2rem];
535
+ }
536
+
537
+ .title {
538
+ @apply mb-2 max-w-[40rem] text-left italic text-sans-lg text-secondary;
539
+ }
540
+
541
+ summary.title {
542
+ @apply not-italic text-raise;
543
+ }
544
+
545
+ .conum {
546
+ @apply inline-block;
547
+ }
548
+
549
+ .table-wrapper {
550
+ @apply relative overflow-x-auto;
551
+ }
552
+
553
+ .table-wrapper caption {
554
+ @apply sticky left-0 text-left;
555
+ }
556
+
557
+ .table-wrapper caption > a {
558
+ @apply no-underline;
559
+ }
560
+
561
+ table {
562
+ @apply w-full border-separate overflow-hidden rounded-lg border p-0 border-secondary;
563
+ border-spacing: 0;
564
+ }
565
+
566
+ .valign-middle {
567
+ vertical-align: middle;
568
+ }
569
+
570
+ .halign-center {
571
+ text-align: center;
572
+ }
573
+
574
+ table p {
575
+ @apply text-sans-md;
576
+ }
577
+
578
+ table td,
579
+ table th {
580
+ @apply border-b border-r px-[0.5rem] py-[0.5rem] align-top border-secondary;
581
+ }
582
+
583
+ table tr th:last-child {
584
+ @apply border-r-0;
585
+ }
586
+
587
+ /*
588
+ specificity to handle nested tables
589
+ todo: check if it's needed in any of the other table styles
590
+ */
591
+ tbody > tr:last-child > td,
592
+ tbody > tr:last-child > th {
593
+ @apply border-b-0;
594
+ }
595
+
596
+ tbody tr td:last-child {
597
+ @apply border-r-0;
598
+ }
599
+
600
+ table th {
601
+ @apply text-left text-mono-xs text-secondary bg-raise;
602
+ }
603
+
604
+ table th p {
605
+ @apply text-mono-xs;
606
+ }
607
+
608
+ table td {
609
+ @apply py-[0.5rem];
610
+ }
611
+
612
+ table pre {
613
+ @apply border-0 p-0;
614
+ }
615
+
616
+ table p {
617
+ @apply m-0 p-0;
618
+ }
619
+
620
+ .colist table {
621
+ @apply my-[1.5rem];
622
+ }
623
+
624
+ .colist table td {
625
+ @apply text-sans-md;
626
+ }
627
+
628
+ .colist table tr td:first-of-type {
629
+ @apply w-[1%] whitespace-nowrap text-tertiary;
630
+ }
631
+
632
+ .colist table b {
633
+ @apply text-mono-sm;
634
+ }
635
+
636
+ div.bibliography ~ h2 {
637
+ @apply mt-12 800:mt-16;
638
+ }
639
+
640
+ .bibliography ul,
641
+ .bibliography ol {
642
+ @apply space-y-2;
643
+ }
644
+
645
+ mark {
646
+ @apply rounded px-[2px] text-notice bg-notice-secondary;
647
+ }
648
+
649
+ .steminline svg {
650
+ @apply inline;
651
+ }
652
+
653
+ hr {
654
+ @apply my-3 border-default;
655
+ }
656
+
657
+ .sidebarblock {
658
+ @apply bg-raise p-4 rounded-lg my-8 px-6 py-5;
659
+ }
660
+
661
+ .halign-left {
662
+ text-align: left;
663
+ }
664
+
665
+ .halign-right {
666
+ text-align: right;
667
+ }
668
+
669
+ .halign-center {
670
+ text-align: center;
671
+ }
672
+
673
+ .valign-top {
674
+ vertical-align: top;
675
+ }
676
+
677
+ .valign-bottom {
678
+ vertical-align: bottom;
679
+ }
680
+
681
+ .valign-middle {
682
+ vertical-align: middle;
683
+ }
684
+
685
+ .paragraph.lead p {
686
+ @apply text-sans-xl;
687
+ }
688
+
689
+ a:not(:is(h1, h2, h3, h4, h5, h6) a) {
690
+ text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
691
+ @apply underline text-accent-secondary;
692
+ }
693
+ }
694
+
695
+ #footnotes p a {
696
+ @apply accent-link;
697
+ }
698
+
699
+ #footnotes p code {
700
+ @apply inline-code;
701
+ }
702
+
703
+ .toc .active code {
704
+ @apply border-accent-tertiary;
705
+ }
706
+
707
+ .toc code {
708
+ @apply ml-[1px] mr-[1px] rounded border px-[3px] align-[1px] border-secondary;
709
+ }
710
+
711
+ @media screen and (min-width: 720px) {
712
+ .animated-accordion[data-state='open'].hydrated {
713
+ animation: accordionSlideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
714
+ }
715
+ .animated-accordion[data-state='closed'].hydrated {
716
+ animation: accordionSlideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
717
+ }
718
+ }
719
+
720
+ @media screen and (min-width: 720px) {
721
+ .animated-accordion {
722
+ overflow: hidden;
723
+ }
724
+ }
725
+
726
+ @media screen and (prefers-reduced-motion) {
727
+ .animated-accordion[data-state='open'] {
728
+ animation-name: none;
729
+ }
730
+ .animated-accordion[data-state='closed'] {
731
+ animation-name: none;
732
+ }
733
+ }
734
+
735
+ @keyframes accordionSlideDown {
736
+ from {
737
+ height: 0;
738
+ }
739
+ to {
740
+ height: var(--radix-accordion-content-height);
741
+ }
742
+ }
743
+
744
+ @keyframes accordionSlideUp {
745
+ from {
746
+ height: var(--radix-accordion-content-height);
747
+ }
748
+ to {
749
+ height: 0;
750
+ }
751
+ }
752
+
753
+ @media print {
754
+ html {
755
+ font-size: 14px !important;
756
+ }
757
+
758
+ a {
759
+ color: inherit !important;
760
+ text-decoration: underline;
761
+ }
762
+
763
+ a.bare,
764
+ a[href^='#'],
765
+ a[href^='mailto:'] {
766
+ text-decoration: none;
767
+ }
768
+
769
+ tr,
770
+ img,
771
+ object,
772
+ svg {
773
+ break-inside: avoid;
774
+ }
775
+
776
+ thead {
777
+ display: table-header-group;
778
+ }
779
+
780
+ pre {
781
+ hyphens: none;
782
+ white-space: pre-wrap;
783
+ }
784
+
785
+ h1 {
786
+ font-size: 2.5rem !important;
787
+ line-height: 1 !important;
788
+ }
789
+
790
+ @page {
791
+ margin-top: 2cm;
792
+ margin-bottom: 2cm;
793
+ }
794
+
795
+ :root,
796
+ .yellow-theme,
797
+ .purple-theme,
798
+ .green-theme,
799
+ .blue-theme,
800
+ .red-theme {
801
+ --surface-default: white;
802
+ --surface-default-p3: var(--surface-default);
803
+ --content-default: black;
804
+ --content-default-p3: var(--content-default);
805
+ --content-secondary: rgb(0, 0, 0, 0.8);
806
+ --content-secondary-p3: var(--content-secondary);
807
+ --content-tertiary: var(--content-secondary);
808
+ --content-tertiary-p3: var(--content-secondary);
809
+ --content-raise: var(--content-default);
810
+ --content-raise-p3: var(--content-default);
811
+ --surface-raise: rgb(0, 0, 0, 0.1);
812
+ --surface-raise-p3: var(--surface-raise);
813
+ --surface-inverse: var(--surface-raise);
814
+ --surface-inverse-p3: var(--surface-raise);
815
+ --stroke-default: var(--content-secondary);
816
+ --stroke-default-p3: var(--content-secondary);
817
+ }
818
+
819
+ p a {
820
+ text-decoration-color: black !important;
821
+ }
822
+
823
+ p {
824
+ color: black !important;
825
+ }
826
+
827
+ .imageblock img {
828
+ border: 0;
829
+ }
830
+
831
+ .admonitionblock {
832
+ color: var(--content-raise) !important;
833
+ background-color: var(--surface-raise) !important;
834
+ }
835
+
836
+ .asciidoc-body {
837
+ h1[data-sectnum]::before,
838
+ h2[data-sectnum]::before,
839
+ h3[data-sectnum]::before,
840
+ h4[data-sectnum]::before,
841
+ h5[data-sectnum]::before {
842
+ @apply !hidden;
843
+ }
844
+
845
+ h1,
846
+ h2,
847
+ h3,
848
+ h4,
849
+ h5 {
850
+ @apply ml-0 pl-0;
851
+ }
852
+
853
+ .paragraph {
854
+ max-width: 80vw;
855
+ }
856
+ }
857
+ }
858
+ }