vanilla-jui 1.5.24 → 1.5.26

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.
@@ -1,692 +0,0 @@
1
- @layer content {
2
- /* ============================================
3
- Content - 文章阅读/编辑器预览样式
4
- ============================================ */
5
- .j-content {
6
- font-size: var(--content-font-size);
7
- line-height: var(--content-line-height);
8
- letter-spacing: var(--content-letter-space);
9
- word-spacing: var(--content-word-space);
10
- word-break: break-word;
11
- text-rendering: optimizeLegibility;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- outline: var(--content-outline);
15
- position: relative;
16
- }
17
-
18
- /* ============================================
19
- Typography - 段落与标题
20
- ============================================ */
21
- .j-content p {
22
- margin: 0 0 var(--content-paragraph-space);
23
- }
24
-
25
- .j-content h1,
26
- .j-content h2,
27
- .j-content h3,
28
- .j-content h4,
29
- .j-content h5,
30
- .j-content h6 {
31
- margin: var(--content-heading-space) 0
32
- calc(var(--content-heading-space) * 0.75);
33
- font-weight: 600;
34
- /* line-height: 1.3; */
35
- color: var(--content-heading-fg);
36
- letter-spacing: -0.02em;
37
- }
38
-
39
- .j-content h1 {
40
- font-size: 2em;
41
- font-weight: 700;
42
- letter-spacing: -0.03em;
43
- margin-top: 0;
44
- }
45
-
46
- .j-content h2 {
47
- font-size: 1.625em;
48
- font-weight: 650;
49
- padding-bottom: 0.25em;
50
- border-bottom: 1px solid var(--content-border-subtle);
51
- }
52
-
53
- .j-content h3 {
54
- font-size: 1.375em;
55
- }
56
-
57
- .j-content h4 {
58
- font-size: 1.125em;
59
- }
60
-
61
- .j-content h5,
62
- .j-content h6 {
63
- font-size: 1em;
64
- }
65
-
66
- /* 标题后的段落减少间距 */
67
- .j-content h1 + p,
68
- .j-content h2 + p,
69
- .j-content h3 + p,
70
- .j-content h4 + p,
71
- .j-content h5 + p,
72
- .j-content h6 + p {
73
- margin-top: calc(var(--content-paragraph-space) * -0.5);
74
- }
75
-
76
- /* ============================================
77
- Inline Elements - 内联元素
78
- ============================================ */
79
- .j-content strong,
80
- .j-content b {
81
- font-weight: 650;
82
- color: var(--content-heading-fg);
83
- }
84
-
85
- .j-content em,
86
- .j-content i {
87
- font-style: italic;
88
- }
89
-
90
- .j-content u {
91
- text-decoration: underline;
92
- text-decoration-thickness: 4px;
93
- text-decoration-color: var(--content-ring);
94
- text-underline-offset: 0.2em;
95
- }
96
-
97
- .j-content s,
98
- .j-content del {
99
- text-decoration: line-through;
100
- color: var(--content-caption-fg);
101
- }
102
-
103
- .j-content mark {
104
- background: var(--tone-highlight);
105
- color: var(--tone-highlight-fg);
106
- padding: 0.1em 0.3em;
107
- border-radius: 0.2em;
108
- }
109
-
110
- .j-content small {
111
- font-size: 0.875em;
112
- color: var(--content-caption-fg);
113
- }
114
-
115
- .j-content sub {
116
- vertical-align: sub;
117
- font-size: 0.75em;
118
- }
119
-
120
- .j-content sup {
121
- vertical-align: super;
122
- font-size: 0.75em;
123
- }
124
-
125
- .j-content abbr[title] {
126
- text-decoration: underline dotted;
127
- text-decoration-color: var(--tone-muted);
128
- text-underline-offset: 0.2em;
129
- cursor: help;
130
- }
131
-
132
- .j-content time {
133
- white-space: nowrap;
134
- color: var(--content-caption-fg);
135
- }
136
-
137
- .j-content ruby {
138
- font-size: 0.95em;
139
- }
140
-
141
- .j-content rt {
142
- font-size: 0.7em;
143
- color: var(--content-caption-fg);
144
- }
145
-
146
- /* ============================================
147
- Links - 链接
148
- ============================================ */
149
- .j-content a {
150
- color: var(--content-link);
151
- text-decoration: none;
152
- text-decoration-color: transparent;
153
- text-underline-offset: 0.15em;
154
- transition:
155
- color 0.15s,
156
- text-decoration-color 0.15s;
157
- }
158
-
159
- .j-content a:hover {
160
- color: var(--content-link-hover);
161
- text-decoration: underline;
162
- text-decoration-color: var(--content-link-hover);
163
- }
164
-
165
- .j-content a:visited {
166
- color: var(--content-link-visited);
167
- }
168
-
169
- .j-content a:active {
170
- color: var(--content-link-active);
171
- }
172
-
173
- /* ============================================
174
- Lists - 列表
175
- ============================================ */
176
- .j-content ul,
177
- .j-content ol {
178
- margin: 0 0 var(--content-paragraph-space);
179
- padding-left: 1.75em;
180
- }
181
-
182
- .j-content ul li,
183
- .j-content ol li {
184
- margin-bottom: var(--content-list-space);
185
- padding-left: 0.25em;
186
- }
187
-
188
- .j-content ul li:last-child,
189
- .j-content ol li:last-child {
190
- margin-bottom: 0;
191
- }
192
-
193
- .j-content ul {
194
- list-style-type: disc;
195
- }
196
-
197
- .j-content ol {
198
- list-style-type: decimal;
199
- }
200
-
201
- .j-content ul ul,
202
- .j-content ol ol,
203
- .j-content ol ul,
204
- .j-content ul ol {
205
- margin-top: var(--content-list-space);
206
- margin-bottom: 0;
207
- }
208
-
209
- .j-content ul ul {
210
- list-style-type: circle;
211
- }
212
-
213
- .j-content ul ul ul {
214
- list-style-type: square;
215
- }
216
-
217
- .j-content ol ol {
218
- list-style-type: lower-alpha;
219
- }
220
-
221
- .j-content ol ol ol {
222
- list-style-type: lower-roman;
223
- }
224
-
225
- .j-content ul p,
226
- .j-content ol p {
227
- margin: 0;
228
- }
229
-
230
- /* Definition List */
231
- .j-content dl {
232
- margin: 0 0 var(--content-block-space);
233
- }
234
-
235
- .j-content dt {
236
- font-weight: 600;
237
- margin-top: 0.75em;
238
- margin-bottom: 0.125em;
239
- color: var(--content-heading-fg);
240
- }
241
-
242
- .j-content dt:first-child {
243
- margin-top: 0;
244
- }
245
-
246
- .j-content dd {
247
- margin: 0 0 0.75em;
248
- padding-left: 1em;
249
- color: var(--tone-body);
250
- }
251
-
252
- .j-content dd + dt {
253
- margin-top: 1em;
254
- }
255
-
256
- /* checkbox - 任务列表 */
257
- .j-content .j-checkbox {
258
- margin-block: var(--content-paragraph-space);
259
- }
260
-
261
- /* ============================================
262
- Blockquote - 引用
263
- ============================================ */
264
- .j-content blockquote {
265
- margin: var(--content-block-space) 0;
266
- margin-left: 0;
267
- margin-right: 0;
268
- padding: 1em 1.5em;
269
- border-left: 3px solid var(--content-border-tone);
270
- border-radius: 0 var(--radius-md) var(--radius-md) 0;
271
- background-color: var(--content-blockquote-bg);
272
- color: var(--content-blockquote-fg);
273
- font-style: italic;
274
- }
275
-
276
- .j-content blockquote p {
277
- margin: 0;
278
- }
279
-
280
- .j-content blockquote p + p {
281
- margin-top: 0.75em;
282
- }
283
-
284
- .j-content cite {
285
- display: block;
286
- margin-top: 0.75em;
287
- font-style: normal;
288
- font-size: 0.875em;
289
- color: var(--content-caption-fg);
290
- }
291
-
292
- .j-content cite::before {
293
- content: '— ';
294
- }
295
-
296
- /* ============================================
297
- Code - 代码
298
- ============================================ */
299
- code {
300
- box-decoration-break: clone;
301
- }
302
-
303
- .j-content code:not([class*='language-']) {
304
- font-family:
305
- 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
306
- font-size: 0.875em;
307
- border: 1px solid var(--content-border-subtle);
308
- border-radius: var(--radius-sm);
309
- word-break: break-word;
310
- padding: 0.15em 0.4em;
311
- background: var(--content-code-bg);
312
- color: var(--content-code-fg);
313
- }
314
-
315
- .j-content kbd {
316
- font-family: inherit;
317
- font-size: 0.875em;
318
- background: var(--content-code-bg);
319
- border: 1px solid var(--content-border);
320
- border-bottom-width: 2px;
321
- border-radius: var(--radius-sm);
322
- padding: 0.1em 0.4em;
323
- color: var(--tone-body);
324
- }
325
-
326
- .j-content pre {
327
- margin: var(--content-block-space) 0;
328
- background: var(--content-code-bg);
329
- font-size: 0.875em;
330
- line-height: 1.6;
331
- tab-size: 2;
332
- }
333
-
334
- .j-content pre code {
335
- background: none;
336
- color: inherit;
337
- font-size: inherit;
338
- }
339
-
340
- .j-content pre.j-code-editor {
341
- position: relative;
342
- margin-block: 1rem;
343
- border-radius: var(--radius-md);
344
- border: 1px solid var(--content-border-subtle);
345
- overflow: auto;
346
- scrollbar-width: thin;
347
- scrollbar-color: var(--ui-border) transparent;
348
- color: var(--ui-fg);
349
- background: var(--content-bg-subtle);
350
- }
351
-
352
- .j-radius-round .j-content pre.j-code-editor {
353
- border-radius: 1.25rem;
354
- }
355
-
356
- .j-code-editor .code-header {
357
- display: flex;
358
- align-items: center;
359
- gap: 40px;
360
- padding: 0.5rem 1rem 0;
361
- font-size: 12px;
362
- color: var(--ui-fg-soft);
363
- }
364
-
365
- .j-code-editor .code-header .code-dots {
366
- width: 8px;
367
- height: 8px;
368
- border-radius: 50%;
369
- background: var(--state-success);
370
- box-shadow:
371
- 14px 0 0 var(--state-warning),
372
- 28px 0 0 var(--state-danger);
373
- }
374
-
375
- .j-code-editor .code-header .code-language,
376
- .j-code-editor .code-header select {
377
- font-size: 0.75rem;
378
- color: var(--ui-fg-soft);
379
- }
380
-
381
- .j-code-editor .code-header select {
382
- appearance: none;
383
- background: transparent;
384
- border: none;
385
- }
386
-
387
- .j-code-editor .code-header select::-ms-expand {
388
- display: none;
389
- }
390
-
391
- .j-content pre code[class*='language-'] {
392
- display: block;
393
- padding: 1.25em 1.5em;
394
- }
395
-
396
- .j-content pre.j-code-editor .code-header + code[class*='language-'] {
397
- padding: 0.5rem 1rem 1rem;
398
- }
399
-
400
- /* purposely ignored */
401
- .hljs-char.escape_,
402
- .hljs-link,
403
- .hljs-params,
404
- .hljs-property,
405
- .hljs-punctuation,
406
- .hljs-tag {
407
- color: var(--ui-gray);
408
- }
409
-
410
- /* prettylights-syntax-entity */
411
- .hljs-title,
412
- .hljs-title.class_,
413
- .hljs-title.class_.inherited__,
414
- .hljs-title.function_ {
415
- color: var(--ui-violet);
416
- }
417
-
418
- /* prettylights-syntax-constant */
419
- .hljs-attr,
420
- .hljs-attribute,
421
- .hljs-literal,
422
- .hljs-meta,
423
- .hljs-number,
424
- .hljs-operator,
425
- .hljs-variable,
426
- .hljs-selector-attr,
427
- .hljs-selector-class,
428
- .hljs-selector-id {
429
- color: var(--ui-teal);
430
- }
431
-
432
- /* prettylights-syntax-keyword */
433
- .hljs-doctag,
434
- .hljs-keyword,
435
- .hljs-meta .hljs-keyword,
436
- .hljs-template-tag,
437
- .hljs-template-variable,
438
- .hljs-type,
439
- .hljs-variable.language_ {
440
- color: var(--ui-tomato);
441
- }
442
-
443
- /* prettylights-syntax-string */
444
- .hljs-regexp,
445
- .hljs-string,
446
- .hljs-meta .hljs-string {
447
- color: var(--ui-pink);
448
- }
449
-
450
- /* prettylights-syntax-variable */
451
- .hljs-built_in,
452
- .hljs-symbol {
453
- color: var(--ui-orange);
454
- }
455
-
456
- /* prettylights-syntax-comment */
457
- .hljs-comment,
458
- .hljs-code,
459
- .hljs-formula {
460
- color: var(--ui-fg-soft);
461
- }
462
-
463
- .language-markdown .hljs-code {
464
- color: inherit;
465
- }
466
-
467
- /* .dark .hljs-comment,
468
- .dark .hljs-code,
469
- .dark .hljs-formula {
470
- color: var(--ui-gray-shade);
471
- } */
472
-
473
- /* prettylights-syntax-entity-tag */
474
- .hljs-name,
475
- .hljs-quote,
476
- .hljs-selector-tag,
477
- .hljs-selector-pseudo {
478
- color: var(--ui-indigo);
479
- }
480
-
481
- /* prettylights-syntax-storage-modifier-import */
482
- .hljs-subst {
483
- color: var(--ui-fg);
484
- }
485
-
486
- /* prettylights-syntax-markup-heading */
487
- .hljs-section {
488
- color: var(--ui-teal);
489
- font-weight: bold;
490
- }
491
-
492
- /* prettylights-syntax-markup-list */
493
- .hljs-bullet {
494
- color: var(--ui-gold);
495
- }
496
-
497
- /* prettylights-syntax-markup-italic */
498
- .hljs-emphasis {
499
- color: var(--ui-fg);
500
- font-style: italic;
501
- }
502
-
503
- /* prettylights-syntax-markup-bold */
504
- .hljs-strong {
505
- color: var(--ui-fg);
506
- font-weight: bold;
507
- }
508
-
509
- /* prettylights-syntax-markup-inserted */
510
- .hljs-addition {
511
- color: var(--ui-indigo);
512
- background-color: #f0fff4;
513
- }
514
-
515
- /* prettylights-syntax-markup-deleted */
516
- .hljs-deletion {
517
- color: var(--ui-ruby);
518
- background-color: #ffeef0;
519
- }
520
-
521
- /* ============================================
522
- Media - 媒体
523
- ============================================ */
524
-
525
- .j-content img {
526
- max-width: 100%;
527
- height: auto;
528
- border-radius: var(--radius-lg);
529
- }
530
-
531
- .j-content figure {
532
- margin: var(--content-block-space) 0;
533
- }
534
-
535
- .j-content figure img,
536
- .j-content figure video,
537
- .j-content figure iframe {
538
- display: block;
539
- margin: 0 auto;
540
- }
541
-
542
- .j-content figcaption {
543
- margin-top: 0.75em;
544
- font-size: 0.875em;
545
- color: var(--content-caption-fg);
546
- text-align: center;
547
- line-height: 1.5;
548
- }
549
-
550
- .j-content iframe,
551
- .j-content video,
552
- .j-content audio {
553
- max-width: 100%;
554
- }
555
-
556
- .j-content video,
557
- .j-content audio {
558
- display: block;
559
- border-radius: var(--radius-lg);
560
- }
561
-
562
- .j-content video {
563
- background-color: var(--ui-fg);
564
- }
565
-
566
- .j-content figure:has(audio) {
567
- display: flex;
568
- flex-direction: column;
569
- justify-content: center;
570
- align-items: center;
571
- }
572
-
573
- /* ============================================
574
- Table - 表格
575
- ============================================ */
576
-
577
- .j-content table {
578
- display: block;
579
- }
580
-
581
- /* ============================================
582
- Horizontal Rule - 分割线
583
- ============================================ */
584
-
585
- .j-content hr {
586
- margin: var(--content-block-space) 0;
587
- border: 0;
588
- height: 1px;
589
- background: var(--content-border);
590
- }
591
-
592
- /* ============================================
593
- Details / Summary - 折叠
594
- ============================================ */
595
-
596
- .j-content details {
597
- margin: var(--content-block-space) 0;
598
- padding: 1em;
599
- background-color: var(--content-bg-subtle);
600
- border-radius: var(--radius-lg);
601
- border: 1px solid var(--content-border-subtle);
602
- }
603
-
604
- .j-content summary {
605
- cursor: pointer;
606
- font-weight: 600;
607
- color: var(--content-heading-fg);
608
- outline: none;
609
- list-style: none;
610
- display: flex;
611
- align-items: center;
612
- gap: 0.5em;
613
- }
614
-
615
- .j-content summary::before {
616
- content: '▸';
617
- display: inline-block;
618
- transition: transform 0.2s ease;
619
- }
620
-
621
- .j-content details[open] > summary::before {
622
- transform: rotate(90deg);
623
- }
624
-
625
- .j-content details[open] p,
626
- .j-content details[open] ul,
627
- .j-content details[open] ol,
628
- .j-content details[open] > * {
629
- margin-bottom: 1em;
630
- }
631
-
632
- /* .j-content details[open]>summary {
633
- margin-bottom: 0.75em;
634
- } */
635
-
636
- .j-content details[open] > summary + * {
637
- margin-top: 0;
638
- }
639
-
640
- .j-content details[open] > *:last-child {
641
- margin-bottom: 0;
642
- }
643
-
644
- /* ============================================
645
- Progress / Meter
646
- ============================================ */
647
-
648
- .j-content progress {
649
- max-width: 100%;
650
- height: 0.5em;
651
- margin: 0.5em 0;
652
- border-radius: var(--radius-full);
653
- overflow: hidden;
654
- }
655
-
656
- .j-content meter {
657
- max-width: 100%;
658
- height: 1em;
659
- margin: 0.25em 0;
660
- }
661
-
662
- /* ============================================
663
- Address
664
- ============================================ */
665
-
666
- .j-content address {
667
- font-style: normal;
668
- margin: 0 0 var(--content-block-space);
669
- padding: 1em 1.25em;
670
- background-color: var(--content-bg-subtle);
671
- border-radius: var(--radius-lg);
672
- color: var(--content-caption-fg);
673
- font-size: 0.9375em;
674
- }
675
-
676
- /* ============================================
677
- Block Item - 通用块级元素
678
- ============================================ */
679
-
680
- .j-content .block-item {
681
- margin: var(--content-block-space) 0;
682
- }
683
-
684
- /* First/Last child margin reset */
685
- .j-content > *:first-child {
686
- margin-top: 0;
687
- }
688
-
689
- .j-content > *:last-child {
690
- margin-bottom: 0;
691
- }
692
- }