@passui/tokens 0.0.0-stage → 0.1.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,726 @@
1
+ @utility typeset {
2
+ --_size: var(--typeset-size, 1em);
3
+ --_leading: var(--typeset-leading, 1.75);
4
+ --_font-body: var(--typeset-font-body, inherit);
5
+ --_font-heading: var(--typeset-font-heading, var(--font-heading));
6
+ --_font-mono: var(--typeset-font-mono, var(--font-mono));
7
+ --_muted: var(--color-muted-foreground,
8
+ color-mix(in oklab, currentColor 60%, transparent));
9
+ --_rule: var(--color-border,
10
+ color-mix(in oklab, currentColor 20%, transparent));
11
+ font-family: var(--_font-body);
12
+ font-size: calc(var(--_size) * var(--typeset-bump, 1.125));
13
+ line-height: var(--_leading);
14
+ color: var(--color-foreground, currentColor);
15
+ overflow-wrap: break-word;
16
+
17
+ @media (min-width: 48rem),
18
+ print {
19
+ font-size: var(--_size);
20
+ }
21
+
22
+ *:not(:where(.not-typeset,
23
+ [data-not-typeset],
24
+ .not-typeset *,
25
+ [data-not-typeset] *)) {
26
+ &:where(p) {
27
+ margin-block: 0;
28
+ line-height: normal;
29
+ color: var(--muted-foreground) !important;
30
+ }
31
+
32
+ &:where(h1, h2, h3, h4, h5, h6) {
33
+ color: var(--color-foreground, currentColor);
34
+ font-family: var(--_font-heading);
35
+ line-height: normal;
36
+ font-weight: 600;
37
+ margin-block: 0;
38
+ }
39
+
40
+ &:where(h1) {
41
+ font-size: 1.75em;
42
+ line-height: 1.3;
43
+ }
44
+
45
+ &:where(h2) {
46
+ font-size: 1.25em;
47
+ line-height: 1.4;
48
+ }
49
+
50
+ &:where(h3) {
51
+ font-size: 1.125em;
52
+ line-height: 1.45;
53
+ }
54
+
55
+ &:where(h4) {
56
+ font-size: 1em;
57
+ line-height: 1.5;
58
+ }
59
+
60
+ &:where(h5) {
61
+ font-size: 0.875em;
62
+ line-height: 1.5;
63
+ font-weight: 500;
64
+ color: var(--_muted);
65
+ }
66
+
67
+ &:where(h6) {
68
+ font-size: 0.8125em;
69
+ line-height: 1.5;
70
+ font-weight: 500;
71
+ letter-spacing: 0.08em;
72
+ text-transform: uppercase;
73
+ color: var(--_muted);
74
+ }
75
+
76
+ &:where([id]) {
77
+ scroll-margin-block-start: 1em;
78
+ }
79
+
80
+ &:where(:is(h1, h2, h3, h4) :is(code)) {
81
+ font-size: 0.9em;
82
+ }
83
+
84
+ &:where(a) {
85
+ color: var(--muted-foreground);
86
+ font-weight: 500;
87
+ text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
88
+ }
89
+
90
+ &:where(a:hover) {
91
+ color: var(--foreground);
92
+ text-decoration-color: currentColor;
93
+ }
94
+
95
+ &:where(a:focus-visible) {
96
+ outline: 2px solid var(--color-ring, currentColor);
97
+ outline-offset: 2px;
98
+ border-radius: 0.125em;
99
+ }
100
+
101
+ &:where(:is(h1, h2, h3, h4, h5, h6) :is(a)) {
102
+ font-weight: inherit;
103
+ }
104
+
105
+ &:where(strong, b) {
106
+ font-weight: 600;
107
+ }
108
+
109
+ &:where(:is(h1, h2, h3, h4) :is(strong, b)) {
110
+ font-weight: 600;
111
+ }
112
+
113
+ &:where(mark) {
114
+ background-color: color-mix(in oklab,
115
+ oklch(0.86 0.17 95) 40%,
116
+ transparent);
117
+ color: inherit;
118
+ padding: 0.05em 0.15em;
119
+ border-radius: 0.2em;
120
+ }
121
+
122
+ &:where(abbr[title]) {
123
+ text-decoration-line: underline;
124
+ text-decoration-style: dotted;
125
+ text-underline-offset: 0.2em;
126
+ cursor: help;
127
+ }
128
+
129
+ &:where(del, s) {
130
+ color: var(--_muted);
131
+ text-decoration-line: line-through;
132
+ }
133
+
134
+ &:where(sup, sub) {
135
+ font-size: 0.75em;
136
+ line-height: 0;
137
+ position: relative;
138
+ vertical-align: baseline;
139
+ }
140
+
141
+ &:where(sup) {
142
+ top: -0.5em;
143
+ }
144
+
145
+ &:where(sub) {
146
+ bottom: -0.25em;
147
+ }
148
+
149
+ &:where(sup a) {
150
+ text-decoration-line: none;
151
+ font-weight: 500;
152
+ }
153
+
154
+ &:where(ul) {
155
+ list-style-type: disc;
156
+ }
157
+
158
+ &:where(ol) {
159
+ list-style-type: decimal;
160
+ }
161
+
162
+ &:where(ul ul) {
163
+ list-style-type: circle;
164
+ }
165
+
166
+ &:where(ul ul ul) {
167
+ list-style-type: square;
168
+ }
169
+
170
+ &:where(ol[type="a" i]) {
171
+ list-style-type: lower-alpha;
172
+ }
173
+
174
+ &:where(ol[type="i" i]) {
175
+ list-style-type: lower-roman;
176
+ }
177
+
178
+ &:where(ol[type="A" s]) {
179
+ list-style-type: upper-alpha;
180
+ }
181
+
182
+ &:where(ol[type="I" s]) {
183
+ list-style-type: upper-roman;
184
+ }
185
+
186
+ &:where(ul, ol) {
187
+ margin-block: 0;
188
+ padding-inline-start: 1.5em;
189
+ }
190
+
191
+ &:where(li) {
192
+ margin-block-start: 0em;
193
+ padding-inline-start: 0.4em;
194
+ }
195
+
196
+ &:where(li > p, li > ul, li > ol) {
197
+ margin-block-start: 0.5em;
198
+ color: var(--muted-foreground) !important;
199
+ }
200
+
201
+ &:where(li > label) {
202
+ color: var(--muted-foreground) !important;
203
+ }
204
+
205
+ &:where(ul > li)::marker {
206
+ color: var(--_muted);
207
+ }
208
+
209
+ &:where(ol > li)::marker {
210
+ color: var(--_muted);
211
+ }
212
+
213
+ &:where(ul.contains-task-list) {
214
+ list-style-type: none;
215
+ padding-left: 0.25em;
216
+ padding-inline-start: 0em;
217
+ }
218
+
219
+ &:where(ul[data-type="taskList"]) {
220
+ padding-left: 0.25em;
221
+ }
222
+
223
+ &:where(ul[data-type="taskList"] > li:not(:has(> p:first-child))) {
224
+ list-style-type: none;
225
+ }
226
+
227
+ &:where(ul[data-type="taskList"] > li) {
228
+ flex-direction: row;
229
+ display: flex;
230
+ align-items: center;
231
+ gap: calc(var(--spacing) * 2);
232
+ }
233
+
234
+ &:where(ul[data-type="taskList"] > li > label) {
235
+ display: flex;
236
+ align-items: center;
237
+ }
238
+
239
+ &:where(ul[data-type="taskList"] > li > label > input[type="checkbox"]) {
240
+ cursor: pointer;
241
+ accent-color: var(--color-muted-foreground, inherit);
242
+ }
243
+
244
+ &:where(ul[data-type="taskList"] > li[data-checked="true"] > div > p) {
245
+ text-decoration-line: line-through;
246
+ text-decoration-color: var(--color-muted-foreground);
247
+ }
248
+
249
+ &:where(li.task-list-item > input[type="checkbox"]) {
250
+ margin-inline-end: 0.5em;
251
+ vertical-align: -0.1em;
252
+ accent-color: var(--color-primary, inherit);
253
+ }
254
+
255
+ &:where(details) {
256
+ margin-block: 0;
257
+ }
258
+
259
+ &:where(summary) {
260
+ cursor: pointer;
261
+ font-weight: 500;
262
+ }
263
+
264
+ &:where(summary)::marker {
265
+ color: var(--_muted);
266
+ }
267
+
268
+ &:where(kbd) {
269
+ font-family: inherit;
270
+ font-size: 0.85em;
271
+ font-weight: 500;
272
+ border: 1px solid var(--_rule);
273
+ border-block-end-width: 2px;
274
+ border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
275
+ padding: 0.0625em 0.35em;
276
+ }
277
+
278
+ &:where(dl) {
279
+ margin-block: 0;
280
+ }
281
+
282
+ &:where(dt) {
283
+ font-weight: 500;
284
+ margin-block-start: 1em;
285
+ }
286
+
287
+ &:where(dt + dt) {
288
+ margin-block-start: 0.25em;
289
+ }
290
+
291
+ &:where(dd) {
292
+ margin-block-start: 0.25em;
293
+ margin-inline-start: 0;
294
+ padding-inline-start: 1em;
295
+ color: var(--_muted);
296
+ }
297
+
298
+ &:where(:not(pre) > code) {
299
+ background-color: var(--color-muted,
300
+ color-mix(in oklab, currentColor 8%, transparent));
301
+ font-family: var(--_font-mono);
302
+ font-size: 0.85em;
303
+ border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
304
+ padding: 0.125em 0.3em;
305
+ }
306
+
307
+ &:where(pre) {
308
+ background-color: var(--color-muted,
309
+ color-mix(in oklab, currentColor 8%, transparent));
310
+ font-family: "JetBrainsMono", monospace, var(--_font-mono);
311
+ font-size: 0.875em;
312
+ line-height: normal;
313
+ tab-size: 2;
314
+ direction: ltr;
315
+ border-radius: var(--radius, 0.5em);
316
+ padding: 0.75em 1em;
317
+ overflow-x: auto;
318
+ margin-block: 0;
319
+ }
320
+
321
+ &:where(pre code) {
322
+ background-color: transparent;
323
+ font-family: inherit;
324
+ font-size: 0.8rem;
325
+ padding: 0;
326
+ border-radius: 0;
327
+
328
+ .hljs-comment,
329
+ .hljs-quote {
330
+ color: #616161;
331
+ }
332
+
333
+ .hljs-variable,
334
+ .hljs-template-variable,
335
+ .hljs-attribute,
336
+ .hljs-tag,
337
+ .hljs-regexp,
338
+ .hljs-link,
339
+ .hljs-name,
340
+ .hljs-selector-id,
341
+ .hljs-selector-class {
342
+ color: #f98181;
343
+ }
344
+
345
+ .hljs-number,
346
+ .hljs-meta,
347
+ .hljs-built_in,
348
+ .hljs-builtin-name,
349
+ .hljs-literal,
350
+ .hljs-type,
351
+ .hljs-params {
352
+ color: #fbbc88;
353
+ }
354
+
355
+ .hljs-string,
356
+ .hljs-symbol,
357
+ .hljs-bullet {
358
+ color: #b9f18d;
359
+ }
360
+
361
+ .hljs-title,
362
+ .hljs-section {
363
+ color: #faf594;
364
+ }
365
+
366
+ .hljs-keyword,
367
+ .hljs-selector-tag {
368
+ color: #70cff8;
369
+ }
370
+
371
+ .hljs-emphasis {
372
+ font-style: italic;
373
+ }
374
+
375
+ .hljs-strong {
376
+ font-weight: 700;
377
+ }
378
+ }
379
+
380
+ /*
381
+ * The docs `Preview`'s own line-numbered codeBlock view
382
+ * (`@baseconfig/ui/basiccn`'s `nodes/code-block-preview.tsx`):
383
+ * the gutter is a plain sibling column, not interleaved into
384
+ * the actual code text, that text stays one real, unsplit,
385
+ * natively selectable node (a NodeView with no real content
386
+ * area is treated as opaque for selection purposes, the same
387
+ * way an image node is, splitting the text itself into
388
+ * per-line elements was tried first and broke text selection
389
+ * entirely). Alignment between the gutter's numbers and the
390
+ * code's own line breaks relies on both sharing the exact same
391
+ * `font-size`/`line-height`, set explicitly on the gutter
392
+ * since `&:where(pre code)`'s own `font-size` above only
393
+ * matches a real `<code>` element, not this `span`. The outer
394
+ * `<pre>` itself switches from `overflow-x: auto` (its default
395
+ * above) to `hidden`, only `.code-block-preview-code` scrolls
396
+ * horizontally, so a long line never carries the gutter out of
397
+ * view with it.
398
+ */
399
+ .code-block-preview {
400
+ display: flex;
401
+ align-items: flex-start;
402
+ gap: 1em;
403
+ overflow-x: hidden;
404
+ }
405
+
406
+ .code-block-gutter {
407
+ display: flex;
408
+ flex-direction: column;
409
+ flex: none;
410
+ font-size: 0.8rem;
411
+ text-align: right;
412
+ color: color-mix(in oklab, currentColor 35%, transparent);
413
+ user-select: none;
414
+ }
415
+
416
+ .code-block-preview-code {
417
+ display: block;
418
+ flex: 1;
419
+ overflow-x: auto;
420
+ white-space: pre;
421
+ }
422
+
423
+ &:where(blockquote) {
424
+ border-inline-start: 2px solid var(--_rule);
425
+ padding-inline-start: 1em;
426
+ margin-block: 0;
427
+ margin-inline: 0;
428
+ }
429
+
430
+ &:where(hr) {
431
+ border: 0;
432
+ border-block-start: 1px solid var(--_rule);
433
+ margin-block: 0;
434
+ }
435
+
436
+ &:where(.footnotes, [data-footnotes]) {
437
+ margin-block: 0;
438
+ border-block-start: 1px solid var(--_rule);
439
+ padding-block-start: 1em;
440
+ font-size: 0.875em;
441
+ color: var(--_muted);
442
+ }
443
+
444
+ &:where(math[display="block"]) {
445
+ margin-block: 0;
446
+ overflow-x: auto;
447
+ overflow-y: hidden;
448
+ padding-block: 0.25em;
449
+ }
450
+
451
+ &:where(img, video) {
452
+ border-radius: var(--radius, 0.5em);
453
+ max-width: 100%;
454
+ height: auto;
455
+ margin-block: 0;
456
+ }
457
+
458
+ &:where(figure) {
459
+ margin-block: 0;
460
+ margin-inline: 0;
461
+ }
462
+
463
+ &:where(figcaption, caption) {
464
+ color: var(--_muted);
465
+ font-size: 0.875em;
466
+ text-align: center;
467
+ margin-block-start: calc(0.75em / 0.875);
468
+ }
469
+
470
+ &:where(caption) {
471
+ caption-side: bottom;
472
+ }
473
+
474
+ &:where(table) {
475
+ max-width: 100%;
476
+ font-size: 1em;
477
+ line-height: 1.5;
478
+ font-variant-numeric: tabular-nums;
479
+ border-collapse: separate;
480
+ border-spacing: 0;
481
+ border-block-end: 1px solid var(--_rule);
482
+ margin-block: 0;
483
+ }
484
+
485
+ &:where(.typeset-scroll) {
486
+ overflow-x: auto;
487
+ }
488
+
489
+ &:where(.typeset-scroll table) {
490
+ width: max-content;
491
+ max-width: none;
492
+ }
493
+
494
+ &:where(thead th) {
495
+ font-weight: 500;
496
+ text-align: start;
497
+ white-space: nowrap;
498
+ padding: 0.65em 1em;
499
+ }
500
+
501
+ &:where(:is(tbody, tfoot) :is(td, th)) {
502
+ padding: 0.75em 1em;
503
+ text-align: start;
504
+ vertical-align: top;
505
+ border-block-start: 1px solid var(--_rule);
506
+ }
507
+
508
+ &:where(tbody th, tfoot th) {
509
+ font-weight: 500;
510
+ }
511
+
512
+ &:where(th:first-child, td:first-child) {
513
+ padding-inline-start: 0;
514
+ }
515
+
516
+ &:where(th[align="center"], td[align="center"]) {
517
+ text-align: center;
518
+ }
519
+
520
+ &:where(th[align="right"], td[align="right"]) {
521
+ text-align: end;
522
+ }
523
+
524
+ &:where(li > blockquote, li > table, li > figure, li > pre) {
525
+ margin-block-start: 0.5em;
526
+ }
527
+
528
+ @media print {
529
+ &:where(pre, table, blockquote, figure) {
530
+ break-inside: avoid;
531
+ }
532
+
533
+ &:where(h1, h2, h3, h4) {
534
+ break-after: avoid;
535
+ }
536
+
537
+ &:where([data-basiccn-page-break]) {
538
+ break-after: page;
539
+ page-break-after: always;
540
+ }
541
+
542
+ &:where(.basiccn-page-break-marker) {
543
+ display: none;
544
+ }
545
+ }
546
+
547
+ @media (forced-colors: active) {
548
+ &:where(:not(pre) > code) {
549
+ border: 1px solid;
550
+ }
551
+ }
552
+ }
553
+
554
+ :where(li > :first-child,
555
+ blockquote > :first-child,
556
+ td > :first-child,
557
+ th > :first-child,
558
+ dd > :first-child,
559
+ figure > :first-child,
560
+ figure > picture > img):not(:where(.not-typeset,
561
+ [data-not-typeset],
562
+ .not-typeset *,
563
+ [data-not-typeset] *)) {
564
+ margin-block-start: 0;
565
+ }
566
+ }
567
+
568
+ @utility typeset-sm {
569
+ --typeset-size: 0.875rem;
570
+ --typeset-leading: 1.65;
571
+ --typeset-bump: 1;
572
+ }
573
+
574
+ @utility typeset-base {
575
+ --typeset-size: 1rem;
576
+ --typeset-leading: 1.75;
577
+ --typeset-bump: 1;
578
+ }
579
+
580
+ @utility typeset-md {
581
+ --typeset-size: 1.0625rem;
582
+ --typeset-leading: 1.8;
583
+ --typeset-bump: 1;
584
+ }
585
+
586
+ @utility typeset-lg {
587
+ --typeset-size: 1.125rem;
588
+ --typeset-leading: 1.85;
589
+ --typeset-bump: 1;
590
+ }
591
+
592
+ @utility typeset-xl {
593
+ --typeset-size: 1.25rem;
594
+ --typeset-leading: 1.9;
595
+ --typeset-bump: 1;
596
+ }
597
+
598
+ @utility typeset-size-* {
599
+ --typeset-size: --value([length]);
600
+ --typeset-bump: 1;
601
+ }
602
+
603
+ @utility typeset-leading-* {
604
+ --typeset-leading: --value(number, [number]);
605
+ }
606
+
607
+ @utility typeset-scroll {
608
+ overflow-x: auto;
609
+ }
610
+
611
+ @custom-variant typeset-headings (& h1:not(:where(.not-typeset,
612
+ [data-not-typeset],
613
+ .not-typeset *,
614
+ [data-not-typeset] *)),
615
+ & h2:not(:where(.not-typeset,
616
+ [data-not-typeset],
617
+ .not-typeset *,
618
+ [data-not-typeset] *)),
619
+ & h3:not(:where(.not-typeset,
620
+ [data-not-typeset],
621
+ .not-typeset *,
622
+ [data-not-typeset] *)),
623
+ & h4:not(:where(.not-typeset,
624
+ [data-not-typeset],
625
+ .not-typeset *,
626
+ [data-not-typeset] *)),
627
+ & h5:not(:where(.not-typeset,
628
+ [data-not-typeset],
629
+ .not-typeset *,
630
+ [data-not-typeset] *)),
631
+ & h6:not(:where(.not-typeset,
632
+ [data-not-typeset],
633
+ .not-typeset *,
634
+ [data-not-typeset] *)));
635
+ @custom-variant typeset-h1 (& h1:not(:where(.not-typeset,
636
+ [data-not-typeset],
637
+ .not-typeset *,
638
+ [data-not-typeset] *)));
639
+ @custom-variant typeset-h2 (& h2:not(:where(.not-typeset,
640
+ [data-not-typeset],
641
+ .not-typeset *,
642
+ [data-not-typeset] *)));
643
+ @custom-variant typeset-h3 (& h3:not(:where(.not-typeset,
644
+ [data-not-typeset],
645
+ .not-typeset *,
646
+ [data-not-typeset] *)));
647
+ @custom-variant typeset-h4 (& h4:not(:where(.not-typeset,
648
+ [data-not-typeset],
649
+ .not-typeset *,
650
+ [data-not-typeset] *)));
651
+ @custom-variant typeset-h5 (& h5:not(:where(.not-typeset,
652
+ [data-not-typeset],
653
+ .not-typeset *,
654
+ [data-not-typeset] *)));
655
+ @custom-variant typeset-h6 (& h6:not(:where(.not-typeset,
656
+ [data-not-typeset],
657
+ .not-typeset *,
658
+ [data-not-typeset] *)));
659
+ @custom-variant typeset-p (& p:not(:where(.not-typeset,
660
+ [data-not-typeset],
661
+ .not-typeset *,
662
+ [data-not-typeset] *)));
663
+ @custom-variant typeset-a (& a:not(:where(.not-typeset,
664
+ [data-not-typeset],
665
+ .not-typeset *,
666
+ [data-not-typeset] *)));
667
+ @custom-variant typeset-strong (& strong:not(:where(.not-typeset,
668
+ [data-not-typeset],
669
+ .not-typeset *,
670
+ [data-not-typeset] *)));
671
+ @custom-variant typeset-blockquote (& blockquote:not(:where(.not-typeset,
672
+ [data-not-typeset],
673
+ .not-typeset *,
674
+ [data-not-typeset] *)));
675
+ @custom-variant typeset-code (& code:not(:where(.not-typeset,
676
+ [data-not-typeset],
677
+ .not-typeset *,
678
+ [data-not-typeset] *)));
679
+ @custom-variant typeset-pre (& pre:not(:where(.not-typeset,
680
+ [data-not-typeset],
681
+ .not-typeset *,
682
+ [data-not-typeset] *)));
683
+ @custom-variant typeset-ul (& ul:not(:where(.not-typeset,
684
+ [data-not-typeset],
685
+ .not-typeset *,
686
+ [data-not-typeset] *)));
687
+ @custom-variant typeset-ol (& ol:not(:where(.not-typeset,
688
+ [data-not-typeset],
689
+ .not-typeset *,
690
+ [data-not-typeset] *)));
691
+ @custom-variant typeset-li (& li:not(:where(.not-typeset,
692
+ [data-not-typeset],
693
+ .not-typeset *,
694
+ [data-not-typeset] *)));
695
+ @custom-variant typeset-table (& table:not(:where(.not-typeset,
696
+ [data-not-typeset],
697
+ .not-typeset *,
698
+ [data-not-typeset] *)));
699
+ @custom-variant typeset-th (& th:not(:where(.not-typeset,
700
+ [data-not-typeset],
701
+ .not-typeset *,
702
+ [data-not-typeset] *)));
703
+ @custom-variant typeset-td (& td:not(:where(.not-typeset,
704
+ [data-not-typeset],
705
+ .not-typeset *,
706
+ [data-not-typeset] *)));
707
+ @custom-variant typeset-img (& img:not(:where(.not-typeset,
708
+ [data-not-typeset],
709
+ .not-typeset *,
710
+ [data-not-typeset] *)));
711
+ @custom-variant typeset-figure (& figure:not(:where(.not-typeset,
712
+ [data-not-typeset],
713
+ .not-typeset *,
714
+ [data-not-typeset] *)));
715
+ @custom-variant typeset-figcaption (& figcaption:not(:where(.not-typeset,
716
+ [data-not-typeset],
717
+ .not-typeset *,
718
+ [data-not-typeset] *)));
719
+ @custom-variant typeset-hr (& hr:not(:where(.not-typeset,
720
+ [data-not-typeset],
721
+ .not-typeset *,
722
+ [data-not-typeset] *)));
723
+ @custom-variant typeset-kbd (& kbd:not(:where(.not-typeset,
724
+ [data-not-typeset],
725
+ .not-typeset *,
726
+ [data-not-typeset] *)));