vanilla-jui 1.7.10 → 1.7.12

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.
Files changed (63) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.umd.js +1 -1
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/src/components/accordion.ts +1 -1
  6. package/src/components/flow.ts +1 -1
  7. package/src/components/form.ts +1 -1
  8. package/src/components/modal.ts +1 -1
  9. package/src/css/index.css +1 -2
  10. package/src/css/layout.css +156 -63
  11. package/src/css/status.css +0 -1
  12. package/src/css/themes/default/accordion.css +37 -1
  13. package/src/css/themes/default/avatar.css +23 -1
  14. package/src/css/themes/default/badge.css +20 -3
  15. package/src/css/themes/default/breadcrumb.css +65 -1
  16. package/src/css/themes/default/button.css +64 -11
  17. package/src/css/themes/default/drop.css +19 -1
  18. package/src/css/themes/default/editor.css +781 -7
  19. package/src/css/themes/default/form.css +650 -2
  20. package/src/css/themes/default/index.css +17 -14
  21. package/src/css/themes/default/loading.css +144 -2
  22. package/src/css/themes/default/menu.css +113 -125
  23. package/src/css/themes/default/modal.css +26 -4
  24. package/src/css/themes/default/offcanvas.css +19 -1
  25. package/src/css/themes/default/pagination.css +13 -1
  26. package/src/css/themes/default/swiper.css +99 -1
  27. package/src/css/themes/default/tabs.css +50 -1
  28. package/src/css/themes/default/theme-palette.css +24 -1
  29. package/src/css/themes/default/tip.css +36 -1
  30. package/src/css/themes/default/toast.css +42 -1
  31. package/src/css/themes/default/toc.css +1 -1
  32. package/src/css/themes/default/toolbar.css +29 -1
  33. package/src/css/themes/default/tooltip.css +8 -2
  34. package/src/css/themes/default/tree.css +40 -3
  35. package/src/css/accordion.css +0 -47
  36. package/src/css/avatar.css +0 -27
  37. package/src/css/badge.css +0 -8
  38. package/src/css/breadcrumb.css +0 -71
  39. package/src/css/button.css +0 -32
  40. package/src/css/components.css +0 -28
  41. package/src/css/divider.css +0 -9
  42. package/src/css/drop.css +0 -21
  43. package/src/css/editor.css +0 -794
  44. package/src/css/form.css +0 -657
  45. package/src/css/loading.css +0 -150
  46. package/src/css/menu.css +0 -74
  47. package/src/css/modal.css +0 -33
  48. package/src/css/offcanvas.css +0 -23
  49. package/src/css/pagination.css +0 -15
  50. package/src/css/popup.css +0 -66
  51. package/src/css/skeleton.css +0 -72
  52. package/src/css/swiper.css +0 -107
  53. package/src/css/tabs.css +0 -58
  54. package/src/css/tag.css +0 -36
  55. package/src/css/theme-palette.css +0 -28
  56. package/src/css/themes/default/popup.css +0 -7
  57. package/src/css/themes/default/tag.css +0 -85
  58. package/src/css/tip.css +0 -40
  59. package/src/css/toast.css +0 -54
  60. package/src/css/toolbar.css +0 -34
  61. package/src/css/tooltip.css +0 -12
  62. package/src/css/tree.css +0 -51
  63. /package/src/css/{flow.css → themes/default/flow.css} +0 -0
@@ -1,4 +1,4 @@
1
- @layer themes {
1
+ @layer components {
2
2
  #j-editor-container {
3
3
  --editor-max-width: 880px;
4
4
  --editor-min-height: calc(100vh - 51px);
@@ -6,8 +6,25 @@
6
6
  --editor-border-width: 1px;
7
7
  --editor-border-style: solid;
8
8
  --editor-border-color: var(--ui-border);
9
+
10
+ max-width: var(--editor-max-width);
11
+ border-width: var(--editor-border-width);
12
+ border-style: var(--editor-border-style);
13
+ border-color: var(--editor-border-color);
14
+ border-top: none;
15
+ border-bottom: none;
16
+ min-height: var(--editor-min-height);
17
+ padding: var(--editor-padding);
18
+ }
19
+
20
+ .ProseMirror {
21
+ outline: 0;
9
22
  }
10
23
 
24
+ /* ============================================
25
+ Editor - 文章阅读/编辑器预览样式
26
+ ============================================ */
27
+
11
28
  .j-editor {
12
29
  --editor-font-size: var(--font-size-lg);
13
30
  --editor-line-height: 1.75;
@@ -32,6 +49,14 @@
32
49
  --editor-code-bg: var(--tone-code-bg);
33
50
  --editor-code-fg: var(--tone-code-fg);
34
51
  --editor-bg-subtle: var(--ui-bg-subtle);
52
+
53
+ font-size: var(--editor-font-size);
54
+ line-height: 1.5;
55
+ letter-spacing: var(--editor-letter-space);
56
+ word-spacing: var(--editor-word-space);
57
+ word-break: break-word;
58
+ outline: 0;
59
+ position: relative;
35
60
  }
36
61
 
37
62
  .j-editor.is-sm {
@@ -40,12 +65,10 @@
40
65
 
41
66
  .j-editor.is-lg {
42
67
  --editor-font-size: var(--font-size-xl);
43
- /* --editor-block-space: 1.5rem; */
44
68
  }
45
69
 
46
70
  .j-editor.is-xl {
47
71
  --editor-font-size: var(--font-size-2xl);
48
- /* --editor-block-space: 1.5rem; */
49
72
  }
50
73
 
51
74
  .j-radius-round .j-editor {
@@ -54,6 +77,757 @@
54
77
  --radius-lg: 1.5rem;
55
78
  }
56
79
 
80
+ /* ============================================
81
+ Typography - 段落与标题
82
+ ============================================ */
83
+
84
+ h1,
85
+ h2,
86
+ h3,
87
+ h4,
88
+ h5,
89
+ h6,
90
+ li,
91
+ p {
92
+ overflow-wrap: break-word;
93
+ }
94
+
95
+ .j-editor h1,
96
+ .j-editor h2,
97
+ .j-editor h3,
98
+ .j-editor h4,
99
+ .j-editor h5,
100
+ .j-editor h6 {
101
+ outline: none;
102
+ position: relative;
103
+ font-weight: 600;
104
+ color: var(--editor-heading-fg);
105
+ margin-bottom: var(--editor-block-space);
106
+ }
107
+
108
+ .j-editor h2,
109
+ .j-editor h3,
110
+ .j-editor h4 {
111
+ line-height: 1.33333;
112
+ }
113
+
114
+ .j-editor h1 {
115
+ font-size: 2em;
116
+ letter-spacing: -0.02em;
117
+ line-height: 1.25;
118
+ margin-block: 0;
119
+ }
120
+
121
+ .j-editor h2 {
122
+ font-size: 1.5em;
123
+ letter-spacing: -0.02em;
124
+ margin-top: 2.25rem;
125
+ }
126
+
127
+ .j-editor h3 {
128
+ font-size: 1.25em;
129
+ letter-spacing: -0.01em;
130
+ margin-top: 2rem;
131
+ }
132
+
133
+ .j-editor h4 {
134
+ font-size: 1.125em;
135
+ letter-spacing: -0.01em;
136
+ margin-top: 1.75rem;
137
+ }
138
+
139
+ .j-editor h5,
140
+ .j-editor h6 {
141
+ font-size: 1em;
142
+ margin-top: 1.5rem;
143
+ line-height: 1.4;
144
+ }
145
+
146
+ .j-editor p {
147
+ margin-block: var(--editor-block-space);
148
+ line-height: var(--editor-line-height);
149
+ }
150
+
151
+ /* ============================================
152
+ Inline Elements - 内联元素
153
+ ============================================ */
154
+ .j-editor strong,
155
+ .j-editor b {
156
+ font-weight: 600;
157
+ color: var(--editor-heading-fg);
158
+ }
159
+
160
+ .j-editor em,
161
+ .j-editor i {
162
+ font-style: italic;
163
+ }
164
+
165
+ .j-editor u {
166
+ text-decoration: underline;
167
+ text-decoration-thickness: 4px;
168
+
169
+ text-decoration-color: var(--editor-ring);
170
+ text-underline-offset: 0.2em;
171
+ }
172
+
173
+ .j-editor s,
174
+ .j-editor del {
175
+ text-decoration: line-through;
176
+ color: var(--editor-caption-fg);
177
+ }
178
+
179
+ .j-editor mark {
180
+ background: var(--tone-highlight);
181
+ color: var(--tone-highlight-fg);
182
+ padding: 0.1em 0.3em;
183
+ border-radius: 0.2em;
184
+ }
185
+
186
+ .j-editor small {
187
+ font-size: 0.875em;
188
+ color: var(--editor-caption-fg);
189
+ }
190
+
191
+ .j-editor sub {
192
+ vertical-align: sub;
193
+ font-size: 0.75em;
194
+ }
195
+
196
+ .j-editor sup {
197
+ vertical-align: super;
198
+ font-size: 0.75em;
199
+ }
200
+
201
+ .j-editor abbr[title] {
202
+ text-decoration: underline dotted;
203
+ text-decoration-color: var(--tone-muted);
204
+ text-underline-offset: 0.2em;
205
+ cursor: help;
206
+ }
207
+
208
+ .j-editor time {
209
+ white-space: nowrap;
210
+ color: var(--editor-caption-fg);
211
+ }
212
+
213
+ .j-editor ruby {
214
+ font-size: 0.95em;
215
+ }
216
+
217
+ .j-editor rt {
218
+ font-size: 0.7em;
219
+ color: var(--editor-caption-fg);
220
+ }
221
+
222
+ /* ============================================
223
+ Links - 链接
224
+ ============================================ */
225
+ .j-editor a {
226
+ color: var(--editor-link);
227
+ text-decoration: none;
228
+
229
+ text-decoration-color: transparent;
230
+ text-underline-offset: 0.15em;
231
+ transition:
232
+ color 0.15s,
233
+ text-decoration-color 0.15s;
234
+ }
235
+
236
+ .j-editor a:hover {
237
+ color: var(--editor-link-hover);
238
+ text-decoration: underline;
239
+ text-decoration-color: var(--editor-link-hover);
240
+ }
241
+
242
+ .j-editor a:visited {
243
+ color: var(--editor-link-visited);
244
+ }
245
+
246
+ .j-editor a:active {
247
+ color: var(--editor-link-active);
248
+ }
249
+
250
+ /* ============================================
251
+ Lists - 列表
252
+ ============================================ */
253
+ .j-editor ul,
254
+ .j-editor ol {
255
+ margin: 0 0 var(--editor-list-space);
256
+ padding-left: 1.5em;
257
+ }
258
+
259
+ .j-editor ul li,
260
+ .j-editor ol li {
261
+ margin-bottom: 0.375em;
262
+ padding-left: 0.25em;
263
+ }
264
+
265
+ .j-editor ul li:last-child,
266
+ .j-editor ol li:last-child {
267
+ margin-bottom: 0;
268
+ }
269
+
270
+ .j-editor ul {
271
+ list-style-type: disc;
272
+ }
273
+
274
+ .j-editor ol {
275
+ list-style-type: decimal;
276
+ }
277
+
278
+ .j-editor ul ul,
279
+ .j-editor ol ol,
280
+ .j-editor ol ul,
281
+ .j-editor ul ol {
282
+ margin-top: var(--editor-space);
283
+ margin-bottom: 0;
284
+ }
285
+
286
+ .j-editor ul ul {
287
+ list-style-type: circle;
288
+ }
289
+
290
+ .j-editor ul ul ul {
291
+ list-style-type: square;
292
+ }
293
+
294
+ .j-editor ol ol {
295
+ list-style-type: lower-alpha;
296
+ }
297
+
298
+ .j-editor ol ol ol {
299
+ list-style-type: lower-roman;
300
+ }
301
+
302
+ .j-editor ul p,
303
+ .j-editor ol p {
304
+ margin: 0;
305
+ }
306
+
307
+ /* Definition List */
308
+ .j-editor dl {
309
+ margin-block: var(--editor-block-space);
310
+ }
311
+
312
+ .j-editor dt {
313
+ font-weight: 600;
314
+ margin-top: 0.75rem;
315
+ margin-bottom: var(--editor-space);
316
+ color: var(--editor-heading-fg);
317
+ }
318
+
319
+ .j-editor dl dt:first-child {
320
+ margin-top: 0;
321
+ }
322
+
323
+ .j-editor dd {
324
+ margin: 0 0 0.75rem;
325
+ padding-left: var(--editor-list-space);
326
+ color: var(--tone-body);
327
+ }
328
+
329
+ /* ============================================
330
+ Task List - 任务列表
331
+ ============================================ */
332
+ .j-editor ul[data-type='taskList'] {
333
+ list-style: none;
334
+ padding: 0;
335
+ margin: 0;
336
+ }
337
+
338
+ .j-editor ul[data-type='taskList'] li {
339
+ display: flex;
340
+ align-items: center;
341
+ gap: 0.5rem;
342
+ }
343
+
344
+ .j-editor ul[data-type='taskList'] li label,
345
+ .j-editor ul[data-type='taskList'] li div {
346
+ display: flex;
347
+ }
348
+
349
+ .j-editor ul[data-type='taskList'] li > label {
350
+ flex: none;
351
+ user-select: none;
352
+ }
353
+
354
+ .j-editor ul[data-type='taskList'] li div {
355
+ flex: auto;
356
+ }
357
+
358
+ .j-editor ul[data-type='taskList'] li div p {
359
+ line-height: 1.5;
360
+ }
361
+
362
+ .j-editor input[type='checkbox'] {
363
+ border: 1px solid var(--ui-border);
364
+ border-radius: var(--radius-sm);
365
+ background: var(--ui-bg);
366
+ clear: none;
367
+ cursor: pointer;
368
+ display: inline-block;
369
+ width: 1rem;
370
+ height: 1rem;
371
+ margin: 0;
372
+ appearance: none;
373
+ transition: all 0.05s ease-in-out;
374
+ }
375
+
376
+ .j-editor input[type='checkbox']:checked {
377
+ background: var(--tone-solid);
378
+ border-color: var(--tone-solid);
379
+ }
380
+
381
+ .dark .j-editor input[type='checkbox']:checked {
382
+ background: var(--tone-shade);
383
+ border-color: var(--tone-shade);
384
+ }
385
+
386
+ .j-editor input[type='checkbox']:checked:before {
387
+ content: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E');
388
+ display: inline-block;
389
+ margin: -0.1875rem 0 0 -0.25rem;
390
+ width: 1.3125rem;
391
+ height: 1.3125rem;
392
+ }
393
+
394
+ .j-editor ul[data-type='taskList'] li:has(input[type='checkbox']:checked) p {
395
+ text-decoration: line-through;
396
+ text-decoration-color: var(--ui-fg);
397
+ text-decoration-thickness: 2px;
398
+ }
399
+
400
+ /* ============================================
401
+ Blockquote - 引用
402
+ ============================================ */
403
+ .j-editor blockquote {
404
+ margin: var(--editor-block-space) 0;
405
+ padding: 0.75rem 1.25rem;
406
+ border-left: 3px solid var(--editor-border-tone);
407
+ border-radius: 0 var(--radius-md) var(--radius-md) 0;
408
+ background-color: var(--editor-blockquote-bg);
409
+ color: var(--editor-blockquote-fg);
410
+ }
411
+
412
+ .j-editor blockquote > * {
413
+ margin-block: 0;
414
+ }
415
+
416
+ .j-editor blockquote > * + * {
417
+ margin-top: 0.25rem;
418
+ }
419
+
420
+ .j-editor cite {
421
+ display: block;
422
+ margin-block: 0.25rem;
423
+ font-style: normal;
424
+ font-size: 0.875em;
425
+ color: var(--editor-caption-fg);
426
+ }
427
+
428
+ .j-editor cite::before {
429
+ content: '— ';
430
+ }
431
+
432
+ /* ============================================
433
+ Code - 代码
434
+ ============================================ */
435
+ code {
436
+ box-decoration-break: clone;
437
+ }
438
+
439
+ .j-editor code:not([class*='language-']),
440
+ .j-editor kbd {
441
+ font-family: Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
442
+ font-size: 0.875em;
443
+ border: 1px solid var(--editor-border-subtle);
444
+ border-radius: var(--radius-sm);
445
+ word-break: break-word;
446
+ background: var(--editor-code-bg);
447
+ color: var(--editor-code-fg);
448
+ }
449
+
450
+ .j-editor code:not([class*='language-']) {
451
+ padding: 2px 4px;
452
+ }
453
+
454
+ .j-editor kbd {
455
+ border-color: var(--editor-border);
456
+ border-bottom-width: 2px;
457
+ padding: 2px 6px;
458
+ color: var(--tone-body);
459
+ }
460
+
461
+ .j-editor pre {
462
+ position: relative;
463
+ margin: 1rem 0;
464
+ font-size: 0.875em;
465
+ line-height: 1.6;
466
+ tab-size: 2;
467
+ color: var(--ui-fg);
468
+ background: var(--editor-bg-subtle);
469
+ border-radius: var(--radius-md);
470
+ border: 1px solid var(--editor-border-subtle);
471
+ }
472
+
473
+ .j-radius-round .j-editor pre {
474
+ border-radius: 1.25rem;
475
+ }
476
+
477
+ pre .code-header {
478
+ display: flex;
479
+ align-items: center;
480
+ gap: 40px;
481
+ padding: 0.5rem 1rem 0;
482
+ font-size: 12px;
483
+ color: var(--ui-fg-soft);
484
+ }
485
+
486
+ pre .code-dots {
487
+ width: 8px;
488
+ height: 8px;
489
+ border-radius: 50%;
490
+ background: var(--state-success);
491
+ box-shadow:
492
+ 14px 0 0 var(--state-warning),
493
+ 28px 0 0 var(--state-danger);
494
+ }
495
+
496
+ pre .code-language,
497
+ pre .code-header select {
498
+ font-size: 12px;
499
+ color: var(--ui-fg-soft);
500
+ }
501
+
502
+ pre .code-header select {
503
+ appearance: none;
504
+ background: transparent;
505
+ border: none;
506
+ box-shadow: none;
507
+ }
508
+
509
+ pre .code-header select::-ms-expand {
510
+ display: none;
511
+ }
512
+
513
+ pre .code-header select:focus-visible {
514
+ outline: 0;
515
+ }
516
+
517
+ .j-editor pre code[class*='language-'] {
518
+ display: block;
519
+ padding: 1rem;
520
+ overflow: auto;
521
+ scrollbar-width: thin;
522
+ scrollbar-color: var(--ui-border) transparent;
523
+ }
524
+
525
+ pre .code-header + code[class*='language-'] {
526
+ padding: 0.5rem 1rem 0.75rem;
527
+ }
528
+
529
+ /* purposely ignored */
530
+ .hljs-char.escape_,
531
+ .hljs-link,
532
+ .hljs-params,
533
+ .hljs-property,
534
+ .hljs-punctuation,
535
+ .hljs-tag {
536
+ color: var(--ui-gray);
537
+ }
538
+
539
+ /* prettylights-syntax-entity */
540
+ .hljs-title,
541
+ .hljs-title.class_,
542
+ .hljs-title.class_.inherited__,
543
+ .hljs-title.function_ {
544
+ color: var(--ui-violet);
545
+ }
546
+
547
+ /* prettylights-syntax-constant */
548
+ .hljs-attr,
549
+ .hljs-attribute,
550
+ .hljs-literal,
551
+ .hljs-meta,
552
+ .hljs-number,
553
+ .hljs-operator,
554
+ .hljs-variable,
555
+ .hljs-selector-attr,
556
+ .hljs-selector-class,
557
+ .hljs-selector-id {
558
+ color: var(--ui-teal);
559
+ }
560
+
561
+ /* prettylights-syntax-keyword */
562
+ .hljs-doctag,
563
+ .hljs-keyword,
564
+ .hljs-meta .hljs-keyword,
565
+ .hljs-template-tag,
566
+ .hljs-template-variable,
567
+ .hljs-type,
568
+ .hljs-variable.language_ {
569
+ color: var(--ui-tomato);
570
+ }
571
+
572
+ /* prettylights-syntax-string */
573
+ .hljs-regexp,
574
+ .hljs-string,
575
+ .hljs-meta .hljs-string {
576
+ color: var(--ui-pink);
577
+ }
578
+
579
+ /* prettylights-syntax-variable */
580
+ .hljs-built_in,
581
+ .hljs-symbol {
582
+ color: var(--ui-orange);
583
+ }
584
+
585
+ /* prettylights-syntax-comment */
586
+ .hljs-comment,
587
+ .hljs-code,
588
+ .hljs-formula {
589
+ color: var(--ui-fg-soft);
590
+ }
591
+
592
+ .language-markdown .hljs-code {
593
+ color: inherit;
594
+ }
595
+
596
+ /* .dark .hljs-comment,
597
+ .dark .hljs-code,
598
+ .dark .hljs-formula {
599
+ color: var(--ui-gray-shade);
600
+ } */
601
+
602
+ /* prettylights-syntax-entity-tag */
603
+ .hljs-name,
604
+ .hljs-quote,
605
+ .hljs-selector-tag,
606
+ .hljs-selector-pseudo {
607
+ color: var(--ui-indigo);
608
+ }
609
+
610
+ /* prettylights-syntax-storage-modifier-import */
611
+ .hljs-subst {
612
+ color: var(--ui-fg);
613
+ }
614
+
615
+ /* prettylights-syntax-markup-heading */
616
+ .hljs-section {
617
+ color: var(--ui-teal);
618
+ font-weight: bold;
619
+ }
620
+
621
+ /* prettylights-syntax-markup-list */
622
+ .hljs-bullet {
623
+ color: var(--ui-gold);
624
+ }
625
+
626
+ /* prettylights-syntax-markup-italic */
627
+ .hljs-emphasis {
628
+ color: var(--ui-fg);
629
+ font-style: italic;
630
+ }
631
+
632
+ /* prettylights-syntax-markup-bold */
633
+ .hljs-strong {
634
+ color: var(--ui-fg);
635
+ font-weight: bold;
636
+ }
637
+
638
+ /* prettylights-syntax-markup-inserted */
639
+ .hljs-addition {
640
+ color: var(--ui-indigo);
641
+ background-color: #f0fff4;
642
+ }
643
+
644
+ /* prettylights-syntax-markup-deleted */
645
+ .hljs-deletion {
646
+ color: var(--ui-ruby);
647
+ background-color: #ffeef0;
648
+ }
649
+
650
+ /* ============================================
651
+ Media - 媒体
652
+ ============================================ */
653
+
654
+ .j-editor img {
655
+ max-width: 100%;
656
+ height: auto;
657
+ }
658
+
659
+ .j-editor figure {
660
+ margin: var(--editor-block-space) 0;
661
+ }
662
+
663
+ .j-editor figure img,
664
+ .j-editor figure video,
665
+ .j-editor figure iframe {
666
+ display: block;
667
+ margin: 0 auto;
668
+ }
669
+
670
+ .j-editor figcaption {
671
+ margin-top: 0.5rem;
672
+ font-size: var(--font-size-md);
673
+ color: var(--editor-caption-fg);
674
+ text-align: center;
675
+ line-height: 1.2;
676
+ }
677
+
678
+ .j-editor iframe,
679
+ .j-editor video,
680
+ .j-editor audio {
681
+ max-width: 100%;
682
+ }
683
+
684
+ .j-editor video,
685
+ .j-editor audio {
686
+ display: block;
687
+ border-radius: var(--radius-lg);
688
+ }
689
+
690
+ .j-editor video {
691
+ background-color: var(--ui-fg);
692
+ }
693
+
694
+ .j-editor figure:has(audio) {
695
+ display: flex;
696
+ flex-direction: column;
697
+ justify-content: center;
698
+ align-items: center;
699
+ }
700
+
701
+ /* ============================================
702
+ Horizontal Rule - 分割线
703
+ ============================================ */
704
+
705
+ .j-editor hr {
706
+ margin: var(--editor-block-space) 0;
707
+ border: 0;
708
+ height: 1px;
709
+ background: var(--editor-border);
710
+ }
711
+
712
+ /* ============================================
713
+ Details / Summary - 折叠
714
+ ============================================ */
715
+
716
+ .j-editor details {
717
+ margin: var(--editor-block-space) 0;
718
+ padding: 1em;
719
+ background-color: var(--editor-bg-subtle);
720
+ border-radius: var(--radius-lg);
721
+ border: 1px solid var(--editor-border-subtle);
722
+ }
723
+
724
+ .j-editor summary {
725
+ cursor: pointer;
726
+ font-weight: 600;
727
+ color: var(--editor-heading-fg);
728
+ outline: none;
729
+ list-style: none;
730
+ display: flex;
731
+ align-items: center;
732
+ gap: 0.5em;
733
+ }
734
+
735
+ .j-editor summary::before {
736
+ content: '▸';
737
+ display: inline-block;
738
+ transition: transform 0.2s ease;
739
+ }
740
+
741
+ .j-editor details[open] > summary::before {
742
+ transform: rotate(90deg);
743
+ }
744
+
745
+ .j-editor details[open] p,
746
+ .j-editor details[open] ul,
747
+ .j-editor details[open] ol,
748
+ .j-editor details[open] > * {
749
+ margin-bottom: 1em;
750
+ }
751
+
752
+ .j-editor details[open] > summary + * {
753
+ margin-top: 0;
754
+ }
755
+
756
+ .j-editor details[open] > *:last-child {
757
+ margin-bottom: 0;
758
+ }
759
+
760
+ /* ============================================
761
+ Progress / Meter
762
+ ============================================ */
763
+
764
+ .j-editor progress {
765
+ max-width: 100%;
766
+ border-radius: 9999px;
767
+ overflow: hidden;
768
+ height: 0.625em;
769
+ margin-block: 0.25em;
770
+ }
771
+
772
+ .j-editor meter {
773
+ max-width: 100%;
774
+ height: 1em;
775
+ margin-block: 0.125em;
776
+ }
777
+
778
+ .j-editor progress::-webkit-progress-value,
779
+ .j-editor meter::-webkit-meter-optimum-value {
780
+ background-color: var(--tone-solid);
781
+ border-radius: 9999px;
782
+ }
783
+
784
+ .j-editor progress::-webkit-progress-bar,
785
+ .j-editor meter::-webkit-meter-bar {
786
+ background-color: var(--tone-border);
787
+ border: none;
788
+ border-radius: 9999px;
789
+ }
790
+
791
+ /* ============================================
792
+ Address
793
+ ============================================ */
794
+ .j-editor address {
795
+ font-style: normal;
796
+ margin-block: var(--editor-block-space);
797
+ padding: 1em 1.25em;
798
+ background-color: var(--editor-bg-subtle);
799
+ border-radius: var(--radius-lg);
800
+ color: var(--editor-caption-fg);
801
+ font-size: 0.9375em;
802
+ }
803
+
804
+ /* ============================================
805
+ Block Item - 通用块级元素
806
+ ============================================ */
807
+ .j-editor > *:first-child {
808
+ margin-top: 0;
809
+ }
810
+
811
+ .j-editor > *:last-child {
812
+ margin-bottom: 0;
813
+ }
814
+
815
+ .j-editor table,
816
+ .j-editor .block {
817
+ margin-block: var(--editor-block-space);
818
+ }
819
+
820
+ .j-editor table {
821
+ text-indent: 0;
822
+ border-color: inherit;
823
+ border-collapse: collapse;
824
+
825
+ overflow-x: auto;
826
+ scrollbar-width: thin;
827
+ scrollbar-color: var(--ui-border) transparent;
828
+ display: block;
829
+ }
830
+
57
831
  .j-editor table td,
58
832
  .j-editor table th {
59
833
  border-width: 1px;
@@ -78,6 +852,10 @@
78
852
  background: var(--ui-bg-subtle);
79
853
  }
80
854
 
855
+ /* ============================================
856
+ Mobile
857
+ ============================================ */
858
+
81
859
  .mobile .j-editor h1 {
82
860
  margin-bottom: 1.5rem;
83
861
  }
@@ -89,8 +867,4 @@
89
867
  .mobile .j-editor p {
90
868
  --editor-block-space: 1.5rem;
91
869
  }
92
-
93
- /* .mobile .j-editor li p {
94
- margin-block: 0;
95
- } */
96
870
  }