@dita-viewer/core 0.2.0 → 0.2.2
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.
- package/LICENSE +21 -21
- package/README.md +90 -58
- package/dist/editor/renderContext.d.ts +7 -0
- package/dist/editor/renderContext.js +24 -0
- package/dist/editor/topicRender.d.ts +9 -0
- package/dist/editor/topicRender.js +4 -2
- package/dist/index.js +3 -3
- package/dist/language/ditaLanguageUtils.js +2 -0
- package/dist/profiling.d.ts +9 -3
- package/dist/profiling.js +12 -6
- package/dist/render/baseTypeMap.js +28 -2
- package/dist/render/mapTypeMap.js +23 -23
- package/dist/render/renderer.d.ts +24 -0
- package/dist/render/renderer.js +36 -9
- package/dist-esm/bookRender.js +145 -0
- package/dist-esm/completion.js +142 -0
- package/dist-esm/completionData.js +155 -0
- package/dist-esm/diagnostics.js +378 -0
- package/dist-esm/editor/conkeyref.js +104 -0
- package/dist-esm/editor/keySpace.js +201 -0
- package/dist-esm/editor/refResolvers.js +633 -0
- package/dist-esm/editor/renderContext.js +138 -0
- package/dist-esm/editor/sourceText.js +142 -0
- package/dist-esm/editor/topicRender.js +328 -0
- package/dist-esm/index.js +66 -0
- package/dist-esm/keyMapForDocument.js +23 -0
- package/dist-esm/language/ditaLanguageUtils.js +659 -0
- package/dist-esm/language/referenceableFiles.js +108 -0
- package/dist-esm/mapRender.js +24 -0
- package/dist-esm/package.json +1 -0
- package/dist-esm/parser/ditaParser.js +409 -0
- package/dist-esm/parser/domTypes.js +1 -0
- package/dist-esm/parser/mapTagMap.js +77 -0
- package/dist-esm/parser/namedEntities.js +321 -0
- package/dist-esm/parser/standardTagMap.js +393 -0
- package/dist-esm/profiling.js +224 -0
- package/dist-esm/render/baseTypeMap.js +1057 -0
- package/dist-esm/render/cjkSpacing.js +94 -0
- package/dist-esm/render/mapTypeMap.js +568 -0
- package/dist-esm/render/renderer.js +519 -0
- package/dist-esm/siteRender.js +261 -0
- package/package.json +55 -53
- package/styles/TOKENS.md +59 -38
- package/styles/dita-content.css +1171 -1157
package/styles/dita-content.css
CHANGED
|
@@ -1,1157 +1,1171 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* dita-core: host-neutral stylesheet for rendered DITA content.
|
|
3
|
-
*
|
|
4
|
-
* Derived from the VS Code DITA Viewer's media/styles.css (lines 14-905 and the DITAMAP tree section, the
|
|
5
|
-
* topic-content rules, plus the .ditamap outline tree and reltable rules; book/site chrome stays with the VS Code host).
|
|
6
|
-
* Differences from that file, and nothing else:
|
|
7
|
-
* - every --vscode-* reference became a --dita-* host token (see TOKENS.md),
|
|
8
|
-
* so the sheet no longer knows which application is hosting it;
|
|
9
|
-
* - :root / .vscode-dark selectors also match a Shadow DOM host
|
|
10
|
-
* (:host / :host([data-scheme="dark"]));
|
|
11
|
-
* - `body` rules
|
|
12
|
-
* `:host(.dv-conref-hot)
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--color-
|
|
30
|
-
--
|
|
31
|
-
--color-
|
|
32
|
-
--color-
|
|
33
|
-
--color-
|
|
34
|
-
--color-
|
|
35
|
-
--color-
|
|
36
|
-
--color-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
--color-
|
|
46
|
-
--color-
|
|
47
|
-
--color-
|
|
48
|
-
--color-
|
|
49
|
-
--color-
|
|
50
|
-
--color-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
--color-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
--color-
|
|
59
|
-
--
|
|
60
|
-
--color-
|
|
61
|
-
--color-
|
|
62
|
-
--color-
|
|
63
|
-
--color-
|
|
64
|
-
--color-
|
|
65
|
-
--color-
|
|
66
|
-
--color-
|
|
67
|
-
--color-
|
|
68
|
-
--color-
|
|
69
|
-
--color-
|
|
70
|
-
--color-
|
|
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
|
-
.dita-
|
|
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
|
-
of
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
--conref-icon-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
--conref-
|
|
228
|
-
--conref-icon-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
--conref-icon-inline-
|
|
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
|
-
var(--conref-
|
|
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
|
-
var(--conref-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
var(--conref-
|
|
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
|
-
border
|
|
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
|
-
.profiled
|
|
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
|
-
.profiling-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
the
|
|
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
|
-
border
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
background:
|
|
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
|
-
font-
|
|
811
|
-
|
|
812
|
-
background: var(--color-code-bg);
|
|
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
|
-
padding
|
|
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
|
-
.dita-book
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
.dita-book-
|
|
985
|
-
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
.
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
.dita-site-
|
|
1024
|
-
.
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
color: inherit;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
.
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
margin:
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
.
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
.map-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1
|
+
/*
|
|
2
|
+
* dita-core: host-neutral stylesheet for rendered DITA content.
|
|
3
|
+
*
|
|
4
|
+
* Derived from the VS Code DITA Viewer's media/styles.css (lines 14-905 and the DITAMAP tree section, the
|
|
5
|
+
* topic-content rules, plus the .ditamap outline tree and reltable rules; book/site chrome stays with the VS Code host).
|
|
6
|
+
* Differences from that file, and nothing else:
|
|
7
|
+
* - every --vscode-* reference became a --dita-* host token (see TOKENS.md),
|
|
8
|
+
* so the sheet no longer knows which application is hosting it;
|
|
9
|
+
* - :root / .vscode-dark selectors also match a Shadow DOM host
|
|
10
|
+
* (:host / :host([data-scheme="dark"]));
|
|
11
|
+
* - `body` rules also match `.dita-body`, `html.dv-conref-hot` also
|
|
12
|
+
* matches `:host(.dv-conref-hot)` (the extra selector matches nothing in
|
|
13
|
+
* the other kind of host, so one sheet serves both);
|
|
14
|
+
* - the image button, context menu and toast read finer tokens
|
|
15
|
+
* (--dita-btn-*, --dita-menu-*, --dita-toast-*) that fall back to the
|
|
16
|
+
* shared ones, so a host that defines only the shared tokens is unchanged;
|
|
17
|
+
* - the two #c0392b literals in .hazardstatement use --color-danger-border
|
|
18
|
+
* (identical value by default; the extension now does the same).
|
|
19
|
+
* A host supplies colours, fonts and sizes by defining the --dita-* tokens
|
|
20
|
+
* (and may override the --color-* palette); it never edits this file.
|
|
21
|
+
*/
|
|
22
|
+
@layer dv-base, wh-compat;
|
|
23
|
+
@layer dv-base {
|
|
24
|
+
:host, :root {
|
|
25
|
+
--body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
26
|
+
--code-font: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
|
|
27
|
+
--line-height: 1.6;
|
|
28
|
+
--max-width: 900px;
|
|
29
|
+
--color-border: #ddd;
|
|
30
|
+
--table-border: #999;
|
|
31
|
+
--color-note-bg: #f0f7ff;
|
|
32
|
+
--color-warning-bg: #fffbf0;
|
|
33
|
+
--color-danger-bg: #fef2f2;
|
|
34
|
+
--color-important-bg: #f8f4ff;
|
|
35
|
+
--color-tip-bg: #f0fdf4;
|
|
36
|
+
--color-note-border: #4a90d9;
|
|
37
|
+
--color-warning-border: #e6a23c;
|
|
38
|
+
--color-danger-border: #c0392b;
|
|
39
|
+
--color-important-border: #8e44ad;
|
|
40
|
+
--color-tip-border: #27ae60;
|
|
41
|
+
/* Bound directly to VS Code's own live theme variable (falls back to a
|
|
42
|
+
light gray if it's ever unavailable) so this always tracks the real,
|
|
43
|
+
current theme instead of relying on a manually-computed .vscode-dark
|
|
44
|
+
class that can go stale relative to the actual active theme. */
|
|
45
|
+
--color-code-bg: var(--dita-code-bg, #f8f8f8);
|
|
46
|
+
--color-link: #2b6cb0;
|
|
47
|
+
--color-code-lang-bg: var(--dita-code-inline-bg, #e8e8e8);
|
|
48
|
+
--color-profiling-bg: #eaf7c9;
|
|
49
|
+
--color-profiling-border: #b8d878;
|
|
50
|
+
--color-profiling-label-bg: #8fb84e;
|
|
51
|
+
--color-profiling-label-text: #2a3a12;
|
|
52
|
+
--color-indexterm-chip-bg: #e6f0fa;
|
|
53
|
+
--color-indexterm-chip-text: #2c5282;
|
|
54
|
+
--color-menucascade-arrow: #767676;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.vscode-dark, :host([data-scheme="dark"]) {
|
|
58
|
+
--color-border: #555;
|
|
59
|
+
--table-border: #777;
|
|
60
|
+
--color-note-bg: #1a2633;
|
|
61
|
+
--color-warning-bg: #33281a;
|
|
62
|
+
--color-danger-bg: #331a1a;
|
|
63
|
+
--color-important-bg: #261a33;
|
|
64
|
+
--color-tip-bg: #1a3326;
|
|
65
|
+
--color-link: #6ab0f3;
|
|
66
|
+
--color-code-bg: var(--dita-code-bg, #555);
|
|
67
|
+
--color-code-lang-bg: var(--dita-code-inline-bg, #666);
|
|
68
|
+
--color-profiling-bg: #3a4a1f;
|
|
69
|
+
--color-profiling-border: #5a7530;
|
|
70
|
+
--color-profiling-label-bg: #6b8f39;
|
|
71
|
+
--color-profiling-label-text: #eef7dc;
|
|
72
|
+
--color-indexterm-chip-bg: #1f2f42;
|
|
73
|
+
--color-indexterm-chip-text: #9dc4ea;
|
|
74
|
+
--color-menucascade-arrow: #aaaaaa;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
body, .dita-body {
|
|
78
|
+
font-family: var(--body-font);
|
|
79
|
+
font-size: 1em;
|
|
80
|
+
line-height: var(--line-height);
|
|
81
|
+
max-width: var(--max-width);
|
|
82
|
+
margin: 0 auto;
|
|
83
|
+
padding: 2rem 1.5rem;
|
|
84
|
+
color: var(--dita-fg);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Every source edit swaps this div's entire innerHTML in one mutation
|
|
88
|
+
(see #dita-content-root's 'updateContent' message handler, shared by
|
|
89
|
+
DitaViewerProvider.ts and MapViewerProvider.ts) -- not a small, targeted
|
|
90
|
+
change the browser's default CSS Scroll Anchoring is designed for (it
|
|
91
|
+
tries to auto-compensate scrollTop to keep whatever it picks as the
|
|
92
|
+
"anchor node" visually fixed when content changes near the viewport).
|
|
93
|
+
When virtually the entire subtree is replaced at once, the previous
|
|
94
|
+
anchor node is gone and whatever the browser picks as a replacement has
|
|
95
|
+
no reliable relationship to what was actually on screen, so its
|
|
96
|
+
compensation can shift scroll position in ways that don't correspond to
|
|
97
|
+
anything real -- consistent with the reported "typing edits far from
|
|
98
|
+
the current scroll position occasionally causes an unexplained extra
|
|
99
|
+
scroll shift" behavior. Turning it off here means scrollTop simply
|
|
100
|
+
stays exactly where it was as a fixed number across the swap, which is
|
|
101
|
+
what both providers' content-only update already assumes; the
|
|
102
|
+
extension's own explicit logic (applyHighlightLine, scrollToLine -- the
|
|
103
|
+
topic viewer only, map view has no scroll-sync of its own) is the only
|
|
104
|
+
thing that should ever intentionally move it. */
|
|
105
|
+
#dita-content-root {
|
|
106
|
+
overflow-anchor: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* In-place mode switch (toolbar-persistence work): added to the OLD content
|
|
110
|
+
root by the mode button's click handler the instant it fires, since its
|
|
111
|
+
own label flips immediately while the new stage is still being rendered
|
|
112
|
+
asynchronously on the host side (getModeToggleScript). Gives that gap a
|
|
113
|
+
visible "switching" state instead of the button and the page silently
|
|
114
|
+
disagreeing for a moment. Needs no matching removal -- applyModeStage
|
|
115
|
+
(MapViewerProvider.ts) discards this exact node once the new stage lands
|
|
116
|
+
and inserts a fresh, undimmed one in its place. */
|
|
117
|
+
#dita-content-root.mode-switching {
|
|
118
|
+
opacity: 0.5;
|
|
119
|
+
transition: opacity 0.1s ease-out;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
/* Positioning context for .dita-mode-switch-overlay below -- scoped to
|
|
122
|
+
this class rather than added unconditionally so it never affects
|
|
123
|
+
#dita-content-root's normal (non-switching) layout. */
|
|
124
|
+
position: relative;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* getModeToggleScript's delayed "still switching" overlay: only appended if
|
|
128
|
+
a switch takes longer than its 400ms grace period (see that script's own
|
|
129
|
+
comment for why), as a child of the OLD #dita-content-root, so it is
|
|
130
|
+
scoped to the content area alone -- the toolbar above it stays fully
|
|
131
|
+
visible and interactive throughout, which is the entire point of the
|
|
132
|
+
in-place-switch work this belongs to. .dita-loading-spinner is the same
|
|
133
|
+
spinner the full-reload path's book-mode placeholder uses
|
|
134
|
+
(MapViewerProvider.ts's generateLoadingHtml); here it is a small overlay
|
|
135
|
+
instead of a full-page one. */
|
|
136
|
+
.dita-mode-switch-overlay {
|
|
137
|
+
position: absolute;
|
|
138
|
+
inset: 0;
|
|
139
|
+
display: flex;
|
|
140
|
+
flex-direction: column;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
gap: 12px;
|
|
144
|
+
color: var(--dita-fg-muted, #999);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Topic article */
|
|
148
|
+
.topic > h1:first-child { margin-top: 0; }
|
|
149
|
+
|
|
150
|
+
/* Short description */
|
|
151
|
+
.shortdesc {
|
|
152
|
+
background: var(--color-note-bg);
|
|
153
|
+
color: var(--dita-fg-muted, var(--dita-fg));
|
|
154
|
+
padding: 0.75rem 1rem;
|
|
155
|
+
border-radius: 4px;
|
|
156
|
+
font-size: 1.05em;
|
|
157
|
+
line-height: 1.6;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Headings */
|
|
161
|
+
h1, h2, h3, h4, h5, h6 {
|
|
162
|
+
margin-top: 1.5em;
|
|
163
|
+
margin-bottom: 0.5em;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
h1 { font-size: 1.8em; border-bottom: 2px solid var(--color-border); padding-bottom: 0.3em; }
|
|
168
|
+
h2 { font-size: 1.5em; }
|
|
169
|
+
h3 { font-size: 1.3em; }
|
|
170
|
+
h4 { font-size: 1.15em; }
|
|
171
|
+
|
|
172
|
+
/* Paragraphs */
|
|
173
|
+
p { margin: 0.75em 0; }
|
|
174
|
+
|
|
175
|
+
/* Note boxes */
|
|
176
|
+
.note {
|
|
177
|
+
border-left: 4px solid var(--color-note-border);
|
|
178
|
+
background: var(--color-note-bg);
|
|
179
|
+
color: var(--dita-fg);
|
|
180
|
+
padding: 0.75rem 1rem;
|
|
181
|
+
margin: 1rem 0;
|
|
182
|
+
border-radius: 0 4px 4px 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.note__label { font-weight: 600; text-transform: capitalize; }
|
|
186
|
+
/* The note text sits in .note__body for the benefit of WebHelp-style css. In
|
|
187
|
+
the own shell it stays inline, so the label and the text share a line as
|
|
188
|
+
they always did (a block here pushes the text onto its own line). */
|
|
189
|
+
body:not(.wh_topic_page) .note__body,
|
|
190
|
+
.dita-body:not(.wh_topic_page) .note__body { display: inline; }
|
|
191
|
+
.note--warning { border-left-color: var(--color-warning-border); background: var(--color-warning-bg); }
|
|
192
|
+
.note--danger { border-left-color: var(--color-danger-border); background: var(--color-danger-bg); }
|
|
193
|
+
.note--important { border-left-color: var(--color-important-border); background: var(--color-important-bg); }
|
|
194
|
+
.note--tip { border-left-color: var(--color-tip-border); background: var(--color-tip-bg); }
|
|
195
|
+
|
|
196
|
+
/* Conref'd content: anything pulled in by conref / conkeyref / conrefend.
|
|
197
|
+
Oxygen's Author mode paints it with a gray background and puts a jump
|
|
198
|
+
button in the top-left corner; a flat opaque gray fights VS Code's themes
|
|
199
|
+
(and the note/section tints underneath), so this is a translucent neutral
|
|
200
|
+
that composes with whatever is behind it, plus a thin leading bar that
|
|
201
|
+
stays visible on dark themes where a faint tint nearly vanishes.
|
|
202
|
+
All of it is drawn as background layers on the element itself -- no
|
|
203
|
+
::before/::after (profiling already owns those on li/ul/ol and the
|
|
204
|
+
non-inline elements) and no wrapper element. The renderer only emits
|
|
205
|
+
data-conref when the preview opts in, so "Export as HTML" and the diff
|
|
206
|
+
view never carry it. The jump icon is a background too, so it has no DOM
|
|
207
|
+
of its own: the click zone is recomputed from the SAME custom properties
|
|
208
|
+
below in conrefJumpScript.ts (getComputedStyle().getPropertyValue())
|
|
209
|
+
-- the vars are the single source of truth, do not re-hardcode the
|
|
210
|
+
numbers on either side. Padding on the block/inline variants gives the
|
|
211
|
+
tint some air on both sides (so it reads as a chunk around the content
|
|
212
|
+
rather than a tight underline) and keeps the leading bar (flush with
|
|
213
|
+
the inner-border edge) clear of the first glyph. */
|
|
214
|
+
:host, :root {
|
|
215
|
+
--color-conref-bg: rgba(128, 128, 128, 0.13);
|
|
216
|
+
--color-conref-bar: rgba(128, 128, 128, 0.55);
|
|
217
|
+
/* Oxygen paints the reuse badge as a few OPEN horizontal strokes (lines of
|
|
218
|
+
text), not a filled/closed page rectangle -- strokes read as airy chrome on
|
|
219
|
+
the translucent tint, whereas a solid glyph competes with content and, on
|
|
220
|
+
dark themes, a white fill glowed. Three lines (not four) keep it lighter;
|
|
221
|
+
the last runs a touch longer and gets a small right arrowhead so the same
|
|
222
|
+
gesture means "jump to source". Light-mode grays below; .vscode-dark
|
|
223
|
+
(after this block) lifts them so the strokes stay legible on dark. */
|
|
224
|
+
--conref-jump-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cg%20fill='none'%20stroke='%239c9c9c'%20stroke-width='1'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%204h7M2%208h7M2%2012h9'/%3E%3Cpath%20d='M9.5%2010.5l1.8%201.5-1.8%201.5'%20stroke='%23808080'/%3E%3C/g%3E%3C/svg%3E");
|
|
225
|
+
/* Geometry read by both the paint rules below and the webview hit-test
|
|
226
|
+
in conrefJumpScript.ts. Change here, both sides move together. */
|
|
227
|
+
--conref-bar-width: 3px;
|
|
228
|
+
--conref-icon-block-size: 16px;
|
|
229
|
+
--conref-icon-block-offset: 3px;
|
|
230
|
+
--conref-icon-cell-size: 15px;
|
|
231
|
+
--conref-icon-cell-offset: 2px;
|
|
232
|
+
--conref-icon-inline-size: 11px;
|
|
233
|
+
--conref-icon-inline-offset: 1px;
|
|
234
|
+
/* Inline slot: the padding-right reserved on the element so the icon
|
|
235
|
+
sits clear of the trailing glyph. Derives as
|
|
236
|
+
offset + size + 1px visual gap, but kept as a flat token so the
|
|
237
|
+
script's hit-test reads the exact same number. */
|
|
238
|
+
--conref-icon-inline-slot: 13px;
|
|
239
|
+
}
|
|
240
|
+
/* Dark-mode badge: same open-line glyph, lifted to light grays so the strokes
|
|
241
|
+
stay legible over a dark canvas without glowing. Must sit AFTER the :root
|
|
242
|
+
block -- .vscode-dark is on <html>, the same element :root targets, so it
|
|
243
|
+
wins on source order, not specificity. */
|
|
244
|
+
.vscode-dark, :host([data-scheme="dark"]) {
|
|
245
|
+
--conref-jump-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cg%20fill='none'%20stroke='%238a8a8a'%20stroke-width='1'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%204h7M2%208h7M2%2012h9'/%3E%3Cpath%20d='M9.5%2010.5l1.8%201.5-1.8%201.5'%20stroke='%23a0a0a0'/%3E%3C/g%3E%3C/svg%3E");
|
|
246
|
+
}
|
|
247
|
+
[data-conref][data-conref] {
|
|
248
|
+
background-repeat: no-repeat;
|
|
249
|
+
}
|
|
250
|
+
[data-conref="block"][data-conref] {
|
|
251
|
+
/* top clears the icon (offset 3 + size 16 + a small gap, hardcoded to match
|
|
252
|
+
the tokens above); left/right symmetric so the leading bar sits at
|
|
253
|
+
the same distance from the first glyph as the right padding does
|
|
254
|
+
from the last; bottom gives the tint some air under the text. */
|
|
255
|
+
padding-top: 22px;
|
|
256
|
+
padding-right: 10px;
|
|
257
|
+
padding-bottom: 6px;
|
|
258
|
+
padding-left: 10px;
|
|
259
|
+
background-image:
|
|
260
|
+
var(--conref-jump-icon),
|
|
261
|
+
linear-gradient(var(--color-conref-bar), var(--color-conref-bar)),
|
|
262
|
+
linear-gradient(var(--color-conref-bg), var(--color-conref-bg));
|
|
263
|
+
background-position:
|
|
264
|
+
var(--conref-icon-block-offset) var(--conref-icon-block-offset),
|
|
265
|
+
left top,
|
|
266
|
+
0 0;
|
|
267
|
+
background-size:
|
|
268
|
+
var(--conref-icon-block-size) var(--conref-icon-block-size),
|
|
269
|
+
var(--conref-bar-width) 100%,
|
|
270
|
+
auto;
|
|
271
|
+
}
|
|
272
|
+
/* A list's indent IS its padding-left (ul, ol { padding-left: 1.5em }); the
|
|
273
|
+
longhand above would flatten it to 10px and push the markers out under the
|
|
274
|
+
bar. Keep the indent and add the same 10px of air on top. */
|
|
275
|
+
ul[data-conref="block"][data-conref],
|
|
276
|
+
ol[data-conref="block"][data-conref],
|
|
277
|
+
.simple-list[data-conref="block"][data-conref] {
|
|
278
|
+
padding-left: calc(1.5em + 10px);
|
|
279
|
+
}
|
|
280
|
+
/* A whole <note> reused: the generic block padding would replace .note's own
|
|
281
|
+
0.75rem 1rem. Keep its horizontal padding (1rem already clears the 3px bar
|
|
282
|
+
and the icon) and bottom; only the top yields, to the icon line. */
|
|
283
|
+
.note[data-conref="block"][data-conref] {
|
|
284
|
+
padding: 22px 1rem 0.75rem 1rem;
|
|
285
|
+
}
|
|
286
|
+
[data-conref="inline"][data-conref] {
|
|
287
|
+
/* left padding mirrors the block treatment on a smaller scale; slice
|
|
288
|
+
(the default box-decoration-break) means only the very first line of
|
|
289
|
+
a wrapped run gets the leading gap, which is what Oxygen shows too.
|
|
290
|
+
padding-right is the slot; the icon hugs the right edge inside it. */
|
|
291
|
+
padding: 0 var(--conref-icon-inline-slot) 0 3px;
|
|
292
|
+
border-radius: 2px;
|
|
293
|
+
background-image:
|
|
294
|
+
var(--conref-jump-icon),
|
|
295
|
+
linear-gradient(var(--color-conref-bg), var(--color-conref-bg));
|
|
296
|
+
background-position:
|
|
297
|
+
right var(--conref-icon-inline-offset) center,
|
|
298
|
+
0 0;
|
|
299
|
+
background-size:
|
|
300
|
+
var(--conref-icon-inline-size) var(--conref-icon-inline-size),
|
|
301
|
+
auto;
|
|
302
|
+
}
|
|
303
|
+
[data-conref="cell"][data-conref] {
|
|
304
|
+
/* Reserve a left gutter so the top-left badge never sits on the first
|
|
305
|
+
glyph -- a <td>'s default 0.75rem left padding is shorter than the
|
|
306
|
+
16px icon, which is why the cell badge was overlapping "Cell A".
|
|
307
|
+
Only padding-left is overridden; top/right/bottom keep the table's
|
|
308
|
+
own 0.5rem/0.75rem so rows stay the same height and text tops stay
|
|
309
|
+
aligned with non-reused sibling cells. */
|
|
310
|
+
padding-left: calc(var(--conref-icon-cell-offset) + var(--conref-icon-cell-size) + 2px);
|
|
311
|
+
background-image:
|
|
312
|
+
var(--conref-jump-icon),
|
|
313
|
+
linear-gradient(var(--color-conref-bg), var(--color-conref-bg));
|
|
314
|
+
background-position:
|
|
315
|
+
var(--conref-icon-cell-offset) var(--conref-icon-cell-offset),
|
|
316
|
+
0 0;
|
|
317
|
+
background-size:
|
|
318
|
+
var(--conref-icon-cell-size) var(--conref-icon-cell-size),
|
|
319
|
+
auto;
|
|
320
|
+
}
|
|
321
|
+
/* Set by the hover hit-test in conrefJumpScript.ts while the pointer is over
|
|
322
|
+
the icon (a background cannot take its own cursor). */
|
|
323
|
+
html.dv-conref-hot [data-conref],
|
|
324
|
+
html.dv-conref-hot [data-conref] *,
|
|
325
|
+
:host(.dv-conref-hot) [data-conref],
|
|
326
|
+
:host(.dv-conref-hot) [data-conref] * {
|
|
327
|
+
cursor: pointer;
|
|
328
|
+
}
|
|
329
|
+
/* Keyboard / screen-reader focus for the jump badge (see conrefJumpScript.ts:
|
|
330
|
+
renderer.ts makes every mark focusable). The badge is a background, so the
|
|
331
|
+
ring is drawn on the element that carries it. :focus-visible, not :focus, so
|
|
332
|
+
a pointer click that lands on the element doesn't ring it -- matching the
|
|
333
|
+
site-nav treatment. Negative offset keeps the ring inside the tint box so it
|
|
334
|
+
never spills onto a neighbouring block. */
|
|
335
|
+
[data-conref][data-conref]:focus-visible {
|
|
336
|
+
outline: 2px solid var(--dita-focus, #007fd4);
|
|
337
|
+
outline-offset: -2px;
|
|
338
|
+
}
|
|
339
|
+
/* The single hidden node every reused element's aria-describedby points at
|
|
340
|
+
(injected by conrefJumpScript.ts). It must be gone from the layout yet still
|
|
341
|
+
present in the accessibility tree, so it is clipped rather than display:none
|
|
342
|
+
-- display:none would remove the description screen readers announce on
|
|
343
|
+
focus, defeating the whole affordance. */
|
|
344
|
+
.dv-visually-hidden {
|
|
345
|
+
position: absolute;
|
|
346
|
+
width: 1px;
|
|
347
|
+
height: 1px;
|
|
348
|
+
margin: -1px;
|
|
349
|
+
padding: 0;
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
clip: rect(0 0 0 0);
|
|
352
|
+
clip-path: inset(50%);
|
|
353
|
+
white-space: nowrap;
|
|
354
|
+
border: 0;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/* Profiling / conditional-processing attribute highlighting (props,
|
|
358
|
+
otherprops, audience, platform, product, base, importance, rev, status).
|
|
359
|
+
Mirrors Oxygen's default "show profiling" style: a tinted box around the
|
|
360
|
+
profiled content with a small label naming the attribute/value that
|
|
361
|
+
matched, rather than hiding anything. Toggled off via body.hide-profiling
|
|
362
|
+
(see the toolbar button in DitaViewerProvider.ts) -- pure CSS, no
|
|
363
|
+
re-render needed. */
|
|
364
|
+
.profiled {
|
|
365
|
+
/* .profiled applies directly to the real element (see injectBlockProfiling
|
|
366
|
+
in renderer.ts), not a synthetic wrapper -- so we must NOT use border or
|
|
367
|
+
padding on the left side: border takes box-model space shifting content
|
|
368
|
+
and nested list markers, and any decoration on <li>/<ul>/<ol> visually
|
|
369
|
+
interferes with the browser's list-marker positioning. box-shadow paints
|
|
370
|
+
outward from the border-box edge without affecting layout, so the green
|
|
371
|
+
highlight ring never pushes content or covers nested bullets/numbers.
|
|
372
|
+
This box-shadow default is kept only for <li>/<ul>/<ol> (see the
|
|
373
|
+
override right below, which switches everything else to a real
|
|
374
|
+
border). */
|
|
375
|
+
box-shadow: 0 0 0 1.5px var(--color-profiling-border);
|
|
376
|
+
border-radius: 3px;
|
|
377
|
+
background: none;
|
|
378
|
+
padding: 0.4rem 0.6rem;
|
|
379
|
+
margin: 0.5rem 0;
|
|
380
|
+
}
|
|
381
|
+
/* Every OTHER block-level profiled element (section, div, p, dl, note,
|
|
382
|
+
...) draws its highlight with a real border instead of the box-shadow
|
|
383
|
+
above. Reported symptom: two independently-profiled block elements
|
|
384
|
+
stacked directly next to each other (e.g. two sibling <section>s, each
|
|
385
|
+
with its own profiling attribute) rendering with their left/right sides
|
|
386
|
+
looking "not closed". box-shadow is purely a paint effect layered
|
|
387
|
+
outside the border-box -- it has no guaranteed closed-rectangle
|
|
388
|
+
semantics of its own the way an actual border does, and at a boundary
|
|
389
|
+
where two elements' painted regions sit close together (their margins
|
|
390
|
+
collapsed to the usual gap above), a thin 1.5px ring is exactly the
|
|
391
|
+
kind of decoration where that can go visibly wrong. A real border
|
|
392
|
+
doesn't share that ambiguity: border-left/right/top/bottom are each
|
|
393
|
+
unconditionally part of the element's own box, drawn every time,
|
|
394
|
+
regardless of what's rendered nearby. This is safe everywhere except
|
|
395
|
+
<li>/<ul>/<ol> -- border-radius/border don't affect list-marker
|
|
396
|
+
positioning on any other element, and for a block element with the
|
|
397
|
+
default width: auto, adding a border doesn't change its outer width
|
|
398
|
+
either (the browser narrows the content area to compensate, same as it
|
|
399
|
+
already does for padding). */
|
|
400
|
+
.profiled:not(li):not(ul):not(ol):not(tr):not(.profiled--inline) {
|
|
401
|
+
box-shadow: none;
|
|
402
|
+
border: 1.5px solid var(--color-profiling-border);
|
|
403
|
+
}
|
|
404
|
+
/* <li>/<ul>/<ol> can't take the same real-border treatment above -- border
|
|
405
|
+
is real box-model space, and shifting an <li>'s own border-box shifts
|
|
406
|
+
where the browser hangs its list-marker, per the comment on .profiled
|
|
407
|
+
itself. box-shadow (and, tried next, outline) turned out not to be
|
|
408
|
+
reliable substitutes: both are paint-only effects layered outside the
|
|
409
|
+
border-box, and reported symptoms kept recurring on <li> specifically
|
|
410
|
+
whenever it had a block-level child like <p> inside it (plain
|
|
411
|
+
text-only <li>s were fine) -- e.g. box-shadow's the exact thing that
|
|
412
|
+
was going wrong for section before switching it to border, and outline
|
|
413
|
+
reproduced the identical "right side won't close" symptom for a
|
|
414
|
+
profiled <li> containing a <p>, plus introduced a new "crossing lines"
|
|
415
|
+
regression that plain border sidesteps.
|
|
416
|
+
Sidestepping the question of exactly which decoration property is safe
|
|
417
|
+
in this Chromium build for a list-item box with block children: draw
|
|
418
|
+
the ring with a real border, but on an absolutely-positioned ::before
|
|
419
|
+
pseudo-element instead of on the <li> itself. An absolutely-positioned
|
|
420
|
+
element is taken out of normal flow entirely, so it cannot move the
|
|
421
|
+
list-marker (nothing about the <li>'s own box model changed -- no new
|
|
422
|
+
border, no new padding, nothing the marker-positioning algorithm could
|
|
423
|
+
react to) while still being a literal border on a literal box, with
|
|
424
|
+
the same unambiguous every-side-drawn-every-time guarantee that fixed
|
|
425
|
+
section. It also can't fragment across the <li>'s own wrapped lines the
|
|
426
|
+
way an inline element's decoration can: this pseudo-element covers the
|
|
427
|
+
<li>'s box exactly once, top to bottom, regardless of how many lines
|
|
428
|
+
its content wraps to internally -- which is what rules out the
|
|
429
|
+
crossing-lines regression outline introduced. */
|
|
430
|
+
.profiled:is(li, ul, ol) {
|
|
431
|
+
position: relative;
|
|
432
|
+
box-shadow: none;
|
|
433
|
+
}
|
|
434
|
+
.profiled:is(li, ul, ol)::before {
|
|
435
|
+
content: '';
|
|
436
|
+
position: absolute;
|
|
437
|
+
top: 0;
|
|
438
|
+
right: 0;
|
|
439
|
+
bottom: 0;
|
|
440
|
+
left: 0;
|
|
441
|
+
border: 1.5px solid var(--color-profiling-border);
|
|
442
|
+
border-radius: 3px;
|
|
443
|
+
pointer-events: none;
|
|
444
|
+
}
|
|
445
|
+
.profiled--inline {
|
|
446
|
+
display: inline;
|
|
447
|
+
|
|
448
|
+
padding: 0 0.2rem;
|
|
449
|
+
margin: 0;
|
|
450
|
+
border-radius: 2px;
|
|
451
|
+
/* Deliberately NOT setting a custom line-height or box-decoration-break
|
|
452
|
+
here (both were tried and reverted). box-decoration-break: clone
|
|
453
|
+
closed the box on both sides at a line wrap, but the reference tool
|
|
454
|
+
this preview is meant to match (Oxygen) leaves it open on purpose --
|
|
455
|
+
previous line's trailing edge unclosed, next line's leading edge
|
|
456
|
+
unclosed -- which is just the CSS default (slice) already gives us
|
|
457
|
+
for free. And the extra line-height added to keep clone's padding
|
|
458
|
+
from bleeding into neighbouring lines pushed up *every* line this
|
|
459
|
+
element touches, including plain single-line usage, making profiled
|
|
460
|
+
phrases visibly taller/inconsistent with surrounding text -- worse
|
|
461
|
+
than the problem it was solving. Staying with the plain defaults here
|
|
462
|
+
keeps single-line height consistent everywhere and matches Oxygen's
|
|
463
|
+
open-sided wrap look. */
|
|
464
|
+
}
|
|
465
|
+
.profiled--inline .profiling-label {
|
|
466
|
+
float: none;
|
|
467
|
+
position: static;
|
|
468
|
+
display: inline-flex;
|
|
469
|
+
align-items: center;
|
|
470
|
+
margin-left: 0.3em;
|
|
471
|
+
vertical-align: middle;
|
|
472
|
+
}
|
|
473
|
+
/* No special containment here for the trailing .profiling-chip (unlike
|
|
474
|
+
.profiled block-level handling below): earlier attempts to reserve
|
|
475
|
+
vertical room via padding+line-height, or to shrink the chip itself to
|
|
476
|
+
fit, both traded one visible problem for another (crossing borders on
|
|
477
|
+
wrapped lines, or a chip that looks flatter/smaller than every other
|
|
478
|
+
.profiling-chip elsewhere). Left at CSS defaults, matching Oxygen's own
|
|
479
|
+
rendering and keeping height consistent whether or not this element
|
|
480
|
+
happens to wrap. */
|
|
481
|
+
/* Clearfix: .profiling-label below is `float: right` so it can share the
|
|
482
|
+
last line with short content (see the comment on .profiling-label) --
|
|
483
|
+
but a float is intentionally excluded from its containing block's own
|
|
484
|
+
height calculation unless that container is cleared or establishes a
|
|
485
|
+
new block formatting context, and .profiled does neither on its own.
|
|
486
|
+
When the label doesn't fit on the same line as the preceding text (long
|
|
487
|
+
or wrapping content) it drops to a line of its own below -- and without
|
|
488
|
+
this rule, .profiled's box-shadow border is sized from the non-floated
|
|
489
|
+
text alone, so it closes *before* that dropped line: the label then
|
|
490
|
+
visually sits outside/below its own green box, and can bleed into the
|
|
491
|
+
top margin of the very next .profiled sibling, breaking what should be
|
|
492
|
+
two clean, separate borders. The classic content:""; display:table;
|
|
493
|
+
clear:both idiom forces an (invisible) trailing box that clears the
|
|
494
|
+
float, so .profiled's own height -- and therefore its border -- always
|
|
495
|
+
extends down to actually contain the label. Scoped away from
|
|
496
|
+
.profiled--inline (label is float:none there, nothing to clear) and
|
|
497
|
+
away from tr.profiled (a <tr> doesn't render ::after reliably, and its
|
|
498
|
+
own label lives inside a <td> which already establishes its own block
|
|
499
|
+
formatting context and needs no help containing floats).
|
|
500
|
+
*/
|
|
501
|
+
.profiled:not(.profiled--inline):not(tr)::after {
|
|
502
|
+
content: '';
|
|
503
|
+
display: table;
|
|
504
|
+
clear: both;
|
|
505
|
+
}
|
|
506
|
+
/* float rather than a dedicated bottom-padding + position:absolute slot:
|
|
507
|
+
the box no longer has to reserve a fixed amount of vertical space for
|
|
508
|
+
the label regardless of how little content actually needs it (a
|
|
509
|
+
single-line profiled step/bullet used to look disproportionately tall,
|
|
510
|
+
with a big empty gap between the text and the label sitting below it).
|
|
511
|
+
Floating right lets the label sit on the *same* line as short content
|
|
512
|
+
for free, while still correctly dropping to its own line -- and staying
|
|
513
|
+
right-aligned there, matching Oxygen's convention and the ditamap tree
|
|
514
|
+
view's own box (see mapTypeMap.ts) -- whenever the preceding content is
|
|
515
|
+
itself block-level (a nested list, a wrapped multi-line paragraph) and
|
|
516
|
+
doesn't leave room on the same line. .profiled--inline above overrides
|
|
517
|
+
this back to float:none, since a label attached to an inline phrase
|
|
518
|
+
(ph/b/i/xref/...) needs to sit immediately next to that phrase
|
|
519
|
+
mid-sentence, not escape to the edge of the whole paragraph. */
|
|
520
|
+
.profiling-label {
|
|
521
|
+
float: right;
|
|
522
|
+
display: flex;
|
|
523
|
+
gap: 0.3rem;
|
|
524
|
+
flex-wrap: wrap;
|
|
525
|
+
margin-left: 0.5em;
|
|
526
|
+
}
|
|
527
|
+
.profiling-chip {
|
|
528
|
+
background: var(--color-profiling-label-bg);
|
|
529
|
+
color: var(--color-profiling-label-text);
|
|
530
|
+
font-size: 0.7em;
|
|
531
|
+
font-weight: 600;
|
|
532
|
+
padding: 0.05rem 0.4rem;
|
|
533
|
+
border-radius: 3px;
|
|
534
|
+
white-space: nowrap;
|
|
535
|
+
}
|
|
536
|
+
.profiling-chip__value { font-weight: 400; }
|
|
537
|
+
/* Index term chips: small inline markers showing an authored <indexterm>'s
|
|
538
|
+
term path right where it appears in the running text -- not a compiled,
|
|
539
|
+
sorted back-of-book index (see the comment on topic/indexterm's renderer
|
|
540
|
+
in baseTypeMap.ts for why: sorting only makes sense for scripts with a
|
|
541
|
+
stable alphabetic/stroke order, so a generated index page would be
|
|
542
|
+
meaningless for e.g. Chinese content). Deliberately understated (smaller,
|
|
543
|
+
lower-contrast than profiling-chip) since these appear far more densely
|
|
544
|
+
in typical content than profiling markers do, and shouldn't compete with
|
|
545
|
+
the actual text for attention. */
|
|
546
|
+
.indexterm-chip {
|
|
547
|
+
display: inline-block;
|
|
548
|
+
background: var(--color-indexterm-chip-bg);
|
|
549
|
+
color: var(--color-indexterm-chip-text);
|
|
550
|
+
font-size: 0.72em;
|
|
551
|
+
padding: 0.02rem 0.35rem;
|
|
552
|
+
border-radius: 3px;
|
|
553
|
+
white-space: nowrap;
|
|
554
|
+
margin: 0 0.15em;
|
|
555
|
+
cursor: default;
|
|
556
|
+
}
|
|
557
|
+
.indexterm-chip--ref { font-style: italic; }
|
|
558
|
+
.indexterm-chip__see { font-style: italic; opacity: 0.85; }
|
|
559
|
+
body.hide-profiling .profiled,
|
|
560
|
+
.dita-body.hide-profiling .profiled {
|
|
561
|
+
background: none;
|
|
562
|
+
box-shadow: none;
|
|
563
|
+
padding: 0;
|
|
564
|
+
margin: 0;
|
|
565
|
+
}
|
|
566
|
+
/* The general reset above zeroes padding on every side, including left --
|
|
567
|
+
correct for everything else profiling touches, but a profiled ul/ol
|
|
568
|
+
relies on that left padding for its own children's marker gutter (see
|
|
569
|
+
ul.profiled/ol.profiled above), not just for the now-hidden box. Without
|
|
570
|
+
restoring it here, turning Flags off would silently break nested-list
|
|
571
|
+
indentation for exactly the same reason it broke with the box visible,
|
|
572
|
+
just conditionally instead of always. */
|
|
573
|
+
body.hide-profiling ul.profiled,
|
|
574
|
+
body.hide-profiling ol.profiled,
|
|
575
|
+
.dita-body.hide-profiling ul.profiled,
|
|
576
|
+
.dita-body.hide-profiling ol.profiled {
|
|
577
|
+
padding-left: 1.5em;
|
|
578
|
+
}
|
|
579
|
+
body.hide-profiling .profiled--inline,
|
|
580
|
+
.dita-body.hide-profiling .profiled--inline { display: inline; }
|
|
581
|
+
body.hide-profiling .profiling-label,
|
|
582
|
+
.dita-body.hide-profiling .profiling-label { display: none; }
|
|
583
|
+
|
|
584
|
+
/* Phase 2 (the filter panel): actually hides content, unlike the toggle
|
|
585
|
+
above which only hides the highlight decoration. !important because
|
|
586
|
+
this needs to override whatever display value .profiled/.profiled--inline
|
|
587
|
+
set, and nothing else in this stylesheet should ever legitimately want
|
|
588
|
+
to re-show something the person explicitly filtered out. */
|
|
589
|
+
.profile-filtered-out { display: none !important; }
|
|
590
|
+
|
|
591
|
+
/* Lists */
|
|
592
|
+
ul, ol { padding-left: 1.5em; }
|
|
593
|
+
li { margin: 0.25em 0; }
|
|
594
|
+
/* Profiling on list elements: box-shadow doesn't affect layout, but the
|
|
595
|
+
generic .profiled padding still overrides the base padding-left both
|
|
596
|
+
rules above rely on. li's own padding-left is normally 0 (a plain li's
|
|
597
|
+
marker-gutter comes entirely from its *parent* ul/ol's padding, not
|
|
598
|
+
from the li itself) -- .profiled's shorthand would otherwise add
|
|
599
|
+
0.6rem there, shifting a profiled li's text right of its plain
|
|
600
|
+
siblings, so it's zeroed back out. ul/ol are the opposite case: their
|
|
601
|
+
own padding-left of 1.5em IS the marker gutter their own <li> children
|
|
602
|
+
need, so when the ul/ol itself is profiled, that 1.5em has to be
|
|
603
|
+
restored (not just zeroed) or its children's markers lose their
|
|
604
|
+
reserved space entirely and the whole nested list stops looking nested
|
|
605
|
+
at all. The top/bottom padding is kept so the box-shadow ring has
|
|
606
|
+
breathing room above and below the content either way. */
|
|
607
|
+
li.profiled { padding-left: 0; }
|
|
608
|
+
ul.profiled, ol.profiled { padding-left: 1.5em; }
|
|
609
|
+
.simple-list { list-style: none; padding-left: 1.5em; }
|
|
610
|
+
|
|
611
|
+
/* Definition lists */
|
|
612
|
+
dl { margin: 1em 0; }
|
|
613
|
+
.dlentry { margin: 0.5em 0; }
|
|
614
|
+
dt { font-weight: 600; margin-top: 0.5em; }
|
|
615
|
+
dd { margin-left: 1.5em; }
|
|
616
|
+
|
|
617
|
+
/* Tables */
|
|
618
|
+
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95em; border: 2px solid var(--table-border); }
|
|
619
|
+
table th, table td { border: 1px solid var(--table-border); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; overflow-wrap: break-word; }
|
|
620
|
+
table th { background: var(--color-code-bg); color: var(--dita-fg); font-weight: 600; }
|
|
621
|
+
|
|
622
|
+
/* Profiling on table rows: the generic .profiled treatment below (box-
|
|
623
|
+
shadow ring + padding + margin) is built for ordinary block content and
|
|
624
|
+
doesn't fit a <tr> living inside this table's border-collapse: collapse
|
|
625
|
+
model. box-shadow paints independently of the collapsed border grid, so
|
|
626
|
+
a ring drawn straight on a row can drift out of alignment with the
|
|
627
|
+
row's actual cell edges (the "green block is offset" symptom), and two
|
|
628
|
+
separately-profiled adjacent rows each painting their own independent
|
|
629
|
+
ring don't share one continuous edge the way collapsed borders do,
|
|
630
|
+
leaving a visible gap/seam between them (the "border between rows is
|
|
631
|
+
incomplete" symptom). Coloring each cell's own border instead works
|
|
632
|
+
*with* border-collapse: a shared edge between two profiled rows merges
|
|
633
|
+
down to a single line, same as any other collapsed border, so
|
|
634
|
+
consecutive profiled rows read as one unbroken green outline. */
|
|
635
|
+
tr.profiled {
|
|
636
|
+
box-shadow: none;
|
|
637
|
+
padding: 0;
|
|
638
|
+
margin: 0;
|
|
639
|
+
background: none;
|
|
640
|
+
}
|
|
641
|
+
tr.profiled > td,
|
|
642
|
+
tr.profiled > th {
|
|
643
|
+
border-color: var(--color-profiling-border);
|
|
644
|
+
}
|
|
645
|
+
body.hide-profiling tr.profiled > td,
|
|
646
|
+
body.hide-profiling tr.profiled > th,
|
|
647
|
+
.dita-body.hide-profiling tr.profiled > td,
|
|
648
|
+
.dita-body.hide-profiling tr.profiled > th {
|
|
649
|
+
border-color: var(--table-border);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/* CALS tables whose <colgroup> carries real colwidth hints (see
|
|
653
|
+
baseTypeMap.ts's 'topic/table' renderer): with the default 'auto' table
|
|
654
|
+
layout those widths are only a hint, and a column with a long unbroken
|
|
655
|
+
run of CJK text (or any content wider than the column's proportional
|
|
656
|
+
share) can force the browser to redistribute space away from a
|
|
657
|
+
short-content column regardless of what colwidth says -- symptom: a
|
|
658
|
+
narrow first column with a couple characters ends up wide, and a long
|
|
659
|
+
multi-paragraph second column ends up squeezed. 'fixed' makes colgroup
|
|
660
|
+
widths authoritative and independent of content. overflow-wrap above
|
|
661
|
+
keeps long unbroken content from overflowing its now content-independent
|
|
662
|
+
column. */
|
|
663
|
+
.cals-table--fixed-layout { table-layout: fixed; }
|
|
664
|
+
|
|
665
|
+
/* Simpletables are meant to be lighter-weight than CALS tables */
|
|
666
|
+
.simple-table th, .simple-table td { padding: 0.4rem 0.6rem; }
|
|
667
|
+
.simple-table th { background: transparent; border-bottom-width: 2px; }
|
|
668
|
+
|
|
669
|
+
/* Foreign content (MathML, embedded SVG) — DITA doesn't signal whether a
|
|
670
|
+
<mathml>/<foreign> block is meant inline or as its own line the way
|
|
671
|
+
<image>'s @placement does, so this stays in normal inline flow by
|
|
672
|
+
default; a small margin just keeps it from crowding adjacent text. */
|
|
673
|
+
.foreign-content { margin: 0 0.15em; }
|
|
674
|
+
|
|
675
|
+
/* Images */
|
|
676
|
+
/* --dita-scale is the only remaining size hint here, driven by the DITA
|
|
677
|
+
source's own @scale attribute -- it sizes the image relative to its OWN
|
|
678
|
+
natural pixel dimensions via 'zoom'. Per-image display sizing (separate
|
|
679
|
+
from @scale, and not tied to the DITA source at all) is applied at
|
|
680
|
+
runtime as an inline width/max-width on the specific <img>, via the
|
|
681
|
+
per-image zoom controls injected by the webview script -- see
|
|
682
|
+
.dita-img-wrap / .dita-img-toolbar below. */
|
|
683
|
+
img { max-width: 100%; height: auto; border-radius: 4px; vertical-align: middle; cursor: zoom-in; zoom: var(--dita-scale, 1); }
|
|
684
|
+
.image-break { display: block; margin: 1rem 0; }
|
|
685
|
+
img[data-load-error] { cursor: default; }
|
|
686
|
+
|
|
687
|
+
/* Per-image zoom/maximize toolbar: a small overlay pinned to the image's
|
|
688
|
+
own top-right corner, shown on hover (or keyboard focus-within, for
|
|
689
|
+
accessibility) rather than a page-wide toolbar, since the control now
|
|
690
|
+
only ever affects the one image it's attached to. Wrapper is an inline
|
|
691
|
+
<span>, not a <div>, so it stays validly nestable inside inline DITA
|
|
692
|
+
contexts like <p> without forcing a block break. */
|
|
693
|
+
.dita-img-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
|
|
694
|
+
.dita-img-toolbar {
|
|
695
|
+
position: absolute; top: 4px; right: 4px; z-index: 10;
|
|
696
|
+
display: flex; gap: 2px;
|
|
697
|
+
opacity: 0; pointer-events: none; transition: opacity 0.15s;
|
|
698
|
+
}
|
|
699
|
+
.dita-img-wrap:hover .dita-img-toolbar,
|
|
700
|
+
.dita-img-wrap:focus-within .dita-img-toolbar {
|
|
701
|
+
opacity: 1; pointer-events: auto;
|
|
702
|
+
}
|
|
703
|
+
.dita-img-btn {
|
|
704
|
+
padding: 1px 5px; border-radius: 3px; line-height: 1.5; font-size: 12px; cursor: pointer;
|
|
705
|
+
border: 1px solid var(--dita-btn-border, var(--dita-border, #555));
|
|
706
|
+
background: var(--dita-bg, rgba(30, 30, 30, 0.85));
|
|
707
|
+
color: var(--dita-btn-fg, var(--dita-fg, #eee));
|
|
708
|
+
}
|
|
709
|
+
.dita-img-btn:hover { opacity: 0.85; }
|
|
710
|
+
|
|
711
|
+
/* Custom right-click "Copy Image" menu (see contextmenu handling in the
|
|
712
|
+
webview script) -- styled to read as a native-ish context menu using
|
|
713
|
+
VS Code's own menu theme tokens, since a real OS context menu isn't
|
|
714
|
+
available consistently across every host this extension runs in. */
|
|
715
|
+
.dita-img-ctxmenu {
|
|
716
|
+
position: fixed; z-index: 100000;
|
|
717
|
+
background: var(--dita-menu-bg, var(--dita-bg-elevated, var(--dita-bg, #1e1e1e)));
|
|
718
|
+
border: 1px solid var(--dita-menu-border, var(--dita-border, #454545));
|
|
719
|
+
border-radius: 4px;
|
|
720
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
|
|
721
|
+
padding: 2px;
|
|
722
|
+
min-width: 140px;
|
|
723
|
+
}
|
|
724
|
+
.dita-img-ctxmenu-item {
|
|
725
|
+
display: block; width: 100%; text-align: left;
|
|
726
|
+
padding: 4px 10px; border: none; border-radius: 3px;
|
|
727
|
+
font-size: 13px; cursor: pointer;
|
|
728
|
+
background: transparent;
|
|
729
|
+
color: var(--dita-menu-fg, var(--dita-fg, #ccc));
|
|
730
|
+
}
|
|
731
|
+
.dita-img-ctxmenu-item:hover,
|
|
732
|
+
.dita-img-ctxmenu-item:focus {
|
|
733
|
+
background: var(--dita-menu-hover-bg, var(--dita-hover-bg, #2a2d2e));
|
|
734
|
+
color: var(--dita-menu-hover-fg, var(--dita-selected-fg, var(--dita-fg, #ccc)));
|
|
735
|
+
outline: none;
|
|
736
|
+
}
|
|
737
|
+
.dita-img-ctxmenu-item:disabled { cursor: default; opacity: 0.7; }
|
|
738
|
+
/* Group divider for the sidebar's multi-item context menu (see
|
|
739
|
+
getSiteOpenSourceScript), matching how a native menu separates groups. */
|
|
740
|
+
.dita-img-ctxmenu-sep {
|
|
741
|
+
height: 1px; margin: 2px 4px;
|
|
742
|
+
background: var(--dita-menu-sep, var(--dita-border, #454545));
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/* Transient feedback pill for the lightbox's Ctrl+C copy path, which has
|
|
746
|
+
no menu item of its own to update the way the right-click menu does. */
|
|
747
|
+
.dita-img-toast {
|
|
748
|
+
position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%);
|
|
749
|
+
z-index: 100001;
|
|
750
|
+
background: var(--dita-toast-bg, var(--dita-bg-elevated, var(--dita-bg, #1e1e1e)));
|
|
751
|
+
border: 1px solid var(--dita-toast-border, var(--dita-border, #454545));
|
|
752
|
+
color: var(--dita-toast-fg, var(--dita-fg, #ccc));
|
|
753
|
+
padding: 6px 14px; border-radius: 4px; font-size: 13px;
|
|
754
|
+
/* UI chrome, not document content: stays sans-serif regardless of the
|
|
755
|
+
reading-font toggle (Serif is a common choice there, and a serif toast
|
|
756
|
+
reads noticeably slower for a quick transient message). */
|
|
757
|
+
font-family: var(--dita-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
|
|
758
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
|
|
759
|
+
max-width: 92vw;
|
|
760
|
+
/* Kept to one line: a short toast that wraps to two is more disruptive
|
|
761
|
+
to read at a glance than one that's simply not padded to a fixed box
|
|
762
|
+
width. The message itself is kept short enough to fit in the common
|
|
763
|
+
case; text-overflow is only a safety net for an unusually long locale
|
|
764
|
+
string or width-option label. */
|
|
765
|
+
white-space: nowrap;
|
|
766
|
+
overflow: hidden;
|
|
767
|
+
text-overflow: ellipsis;
|
|
768
|
+
text-align: center;
|
|
769
|
+
}
|
|
770
|
+
/* For feedback tied to a top-of-page control (the width dropdown): a
|
|
771
|
+
bottom toast is easy to miss entirely, or costs a big jump down to
|
|
772
|
+
notice, right after the user's focus and click just landed at the top. */
|
|
773
|
+
.dita-img-toast--top { bottom: auto; top: 48px; }
|
|
774
|
+
|
|
775
|
+
/* Figures */
|
|
776
|
+
/* Left-aligned rather than centered: a fig's image should sit flush with
|
|
777
|
+
the surrounding body text's left edge (and, inside a list item, with the
|
|
778
|
+
li's text rather than its marker), matching how DITA authors read
|
|
779
|
+
figures in Oxygen. figure has no left/right margin of its own, so this
|
|
780
|
+
naturally follows whatever indent its containing block already has. */
|
|
781
|
+
figure { margin: 1.5rem 0; text-align: left; }
|
|
782
|
+
figcaption { font-style: italic; margin-top: 0.2rem; font-size: 0.95em; text-align: left; }
|
|
783
|
+
|
|
784
|
+
/* Code blocks */
|
|
785
|
+
pre.codeblock, pre.preformatted {
|
|
786
|
+
background: var(--color-code-bg);
|
|
787
|
+
color: var(--dita-fg);
|
|
788
|
+
border: 1px solid var(--color-border);
|
|
789
|
+
border-radius: 4px;
|
|
790
|
+
padding: 1rem;
|
|
791
|
+
overflow-x: auto;
|
|
792
|
+
font-family: var(--code-font);
|
|
793
|
+
font-size: 0.9em;
|
|
794
|
+
line-height: 1.5;
|
|
795
|
+
position: relative;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* Wraps a codeblock that has a language label. This element -- not the
|
|
799
|
+
<pre> itself -- is what .codeblock-lang is positioned against: <pre>
|
|
800
|
+
has overflow-x:auto for wide code, and an absolutely-positioned child of
|
|
801
|
+
a scrolling box scrolls along with its content, so the label used to
|
|
802
|
+
drift out of view as soon as the code was scrolled horizontally.
|
|
803
|
+
.codeblock-wrap sits outside that scrolling area, so the label stays
|
|
804
|
+
pinned to the visible top-right corner regardless of scroll position. */
|
|
805
|
+
.codeblock-wrap {
|
|
806
|
+
position: relative;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.codeblock-lang {
|
|
810
|
+
font-family: var(--code-font);
|
|
811
|
+
font-size: 0.72em;
|
|
812
|
+
background: var(--color-code-lang-bg);
|
|
813
|
+
color: var(--dita-fg);
|
|
814
|
+
padding: 0.1em 0.5em;
|
|
815
|
+
border-radius: 0 3px 0 3px;
|
|
816
|
+
position: absolute;
|
|
817
|
+
top: 0;
|
|
818
|
+
right: 0;
|
|
819
|
+
pointer-events: none;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
code {
|
|
823
|
+
font-family: var(--code-font);
|
|
824
|
+
font-size: 0.9em;
|
|
825
|
+
color: var(--dita-fg);
|
|
826
|
+
background: var(--color-code-bg);
|
|
827
|
+
padding: 0.15em 0.3em;
|
|
828
|
+
border-radius: 3px;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
pre code { background: none; padding: 0; border-radius: 0; }
|
|
832
|
+
|
|
833
|
+
/* Links */
|
|
834
|
+
.xref { color: var(--color-link); text-decoration: none; }
|
|
835
|
+
.xref:hover { text-decoration: underline; }
|
|
836
|
+
.xref-external { font-style: italic; font-size: 0.9em; opacity: 0.7; }
|
|
837
|
+
.link { color: var(--color-link); text-decoration: none; }
|
|
838
|
+
.link:hover { text-decoration: underline; }
|
|
839
|
+
|
|
840
|
+
/* Inline formatting */
|
|
841
|
+
.keyword { font-weight: 500; }
|
|
842
|
+
.term { font-style: italic; border-bottom: 1px dotted; }
|
|
843
|
+
/* Phrase span only: the highlight domain (b/i/u/tt/sup/sub/line-through/overline) now also carries the html5 `ph` token and must not be dimmed. overline is the one hi-d member rendered as a <span>, so it is excluded here too. */
|
|
844
|
+
span.ph:not(.unresolved-keyref):not(.overline) { opacity: 0.8; }
|
|
845
|
+
.overline { text-decoration: overline; }
|
|
846
|
+
.unresolved-keyref { opacity: 1; color: #e67e22; border: 1px dashed #e67e22; padding: 0 0.3em; border-radius: 3px; cursor: help; }
|
|
847
|
+
|
|
848
|
+
/* User Interface domain */
|
|
849
|
+
.uicontrol { font-weight: 500; color: var(--dita-link); }
|
|
850
|
+
.menucascade .uicontrol + .uicontrol::before { content: ' › '; color: var(--color-menucascade-arrow); font-weight: normal; }
|
|
851
|
+
.wintitle { font-style: italic; font-weight: 600; }
|
|
852
|
+
.filepath { font-family: var(--code-font); font-size: 0.9em; padding: 0.1em 0.3em; background: var(--color-code-bg); border-radius: 3px; color: var(--dita-fg); }
|
|
853
|
+
.userinput { font-family: var(--code-font); font-size: 0.9em; padding: 0.1em 0.3em; background: var(--color-code-bg); border-radius: 3px; border: 1px dashed var(--color-border); color: var(--dita-fg); }
|
|
854
|
+
.systemoutput { font-family: var(--code-font); font-size: 0.9em; padding: 0.1em 0.3em; background: var(--color-code-bg); border-radius: 3px; color: var(--dita-fg); }
|
|
855
|
+
.apiname { font-family: var(--code-font); font-size: 0.9em; font-weight: 500; }
|
|
856
|
+
.parmname { font-family: var(--code-font); font-size: 0.9em; font-style: italic; }
|
|
857
|
+
.option { font-family: var(--code-font); font-size: 0.9em; color: var(--color-link); }
|
|
858
|
+
.cmdname { font-family: var(--code-font); font-size: 0.9em; font-weight: 600; }
|
|
859
|
+
.varname { font-family: var(--code-font); font-size: 0.9em; font-style: italic; color: var(--color-link); }
|
|
860
|
+
.msgnum { font-family: var(--code-font); font-size: 0.85em; padding: 0.1em 0.3em; border: 1px solid var(--color-border); border-radius: 3px; }
|
|
861
|
+
/* msgph: the variable/substitutable portion of a message (OASIS DITA 1.3.2,
|
|
862
|
+
sec. 3.2.7.2) -- semantically a varname-like placeholder embedded in
|
|
863
|
+
message text, not plain prose. Previously fell through to no dedicated
|
|
864
|
+
rule and rendered indistinguishable from surrounding text. */
|
|
865
|
+
.msgph { font-family: var(--code-font); font-size: 0.9em; font-style: italic; padding: 0 0.2em; color: var(--color-link); }
|
|
866
|
+
|
|
867
|
+
/* Programming domain */
|
|
868
|
+
.codeph { font-family: var(--code-font); font-size: 0.9em; background: var(--color-code-bg); padding: 0.1em 0.3em; border-radius: 3px; color: var(--dita-fg); }
|
|
869
|
+
.synph { font-family: var(--code-font); font-size: 0.9em; }
|
|
870
|
+
.kwd { font-weight: 600; font-family: var(--code-font); }
|
|
871
|
+
.var { font-style: italic; font-family: var(--code-font); }
|
|
872
|
+
.oper { font-weight: 600; color: var(--color-link); }
|
|
873
|
+
.sep { color: var(--color-border); }
|
|
874
|
+
.delim { font-weight: 600; color: var(--color-link); }
|
|
875
|
+
.syntaxdiagram { border: 1px solid var(--color-border); border-radius: 4px; padding: 1rem; margin: 1rem 0; overflow-x: auto; }
|
|
876
|
+
.synblk { background: var(--color-code-bg); color: var(--dita-fg); border: 1px solid var(--color-border); border-radius: 4px; padding: 0.75rem; margin: 0.5rem 0; overflow-x: auto; font-family: var(--code-font); font-size: 0.9em; }
|
|
877
|
+
.synnote { font-size: 0.9em; margin: 0.5rem 0; padding: 0.5rem; border-left: 3px solid var(--color-border); }
|
|
878
|
+
.fragment { font-family: var(--code-font); font-size: 0.9em; }
|
|
879
|
+
.fragref { font-family: var(--code-font); font-size: 0.9em; color: var(--color-link); }
|
|
880
|
+
|
|
881
|
+
/* Software domain */
|
|
882
|
+
.screen { background: var(--color-code-bg); color: var(--dita-fg); border: 1px solid var(--color-border); border-radius: 4px; padding: 1rem; overflow-x: auto; font-family: var(--code-font); font-size: 0.9em; line-height: 1.5; white-space: pre-wrap; }
|
|
883
|
+
.msgph { font-family: var(--code-font); font-size: 0.9em; }
|
|
884
|
+
.msgblock { background: var(--color-code-bg); color: var(--dita-fg); border: 1px solid var(--color-border); border-radius: 4px; padding: 0.75rem; font-family: var(--code-font); font-size: 0.9em; white-space: pre-wrap; }
|
|
885
|
+
|
|
886
|
+
/* Body elements */
|
|
887
|
+
.lines { background: var(--color-code-bg); color: var(--dita-fg); border: 1px solid var(--color-border); border-radius: 4px; padding: 0.75rem 1rem; font-family: var(--code-font); font-size: 0.9em; line-height: 1.5; white-space: pre-wrap; }
|
|
888
|
+
.fn { font-size: 0.75em; vertical-align: super; cursor: help; color: var(--color-link); }
|
|
889
|
+
cite { font-style: italic; }
|
|
890
|
+
.boolean { font-family: var(--code-font); font-size: 0.9em; font-weight: 500; }
|
|
891
|
+
.tm { font-size: 0.75em; vertical-align: super; }
|
|
892
|
+
.body-div { margin: 0.75rem 0; }
|
|
893
|
+
.section-div { margin: 0.75rem 0; }
|
|
894
|
+
.figgroup { margin: 0.75rem 0; }
|
|
895
|
+
|
|
896
|
+
/* Parameter lists */
|
|
897
|
+
.parml { margin: 1em 0; }
|
|
898
|
+
.plentry { margin: 0.5em 0; }
|
|
899
|
+
.pt { font-weight: 600; font-family: var(--code-font); font-size: 0.95em; margin-top: 0.5em; }
|
|
900
|
+
.pd { margin-left: 1.5em; }
|
|
901
|
+
|
|
902
|
+
/* Abbreviation / Glossary */
|
|
903
|
+
.abbreviated-form { border-bottom: 1px dotted var(--color-border); cursor: help; }
|
|
904
|
+
.glossterm { font-weight: 600; font-style: italic; }
|
|
905
|
+
.glossdef { margin-left: 1.5em; }
|
|
906
|
+
.glossentry { margin: 1em 0; }
|
|
907
|
+
|
|
908
|
+
/* Hazard */
|
|
909
|
+
.hazardstatement { border-left: 4px solid var(--color-danger-border); background: var(--color-danger-bg); color: var(--dita-fg); padding: 0.75rem 1rem; margin: 1rem 0; border-radius: 0 4px 4px 0; }
|
|
910
|
+
.typeofhazard { font-weight: 600; color: var(--color-danger-border); }
|
|
911
|
+
.howtoavoid { margin: 0.5rem 0; }
|
|
912
|
+
.consequence { margin: 0.5rem 0; }
|
|
913
|
+
|
|
914
|
+
/* Other */
|
|
915
|
+
|
|
916
|
+
/* Related links */
|
|
917
|
+
.related-links { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
|
|
918
|
+
.related-links h2 { font-size: 1.1em; margin-top: 0; }
|
|
919
|
+
|
|
920
|
+
/* Quotes */
|
|
921
|
+
blockquote { border-left: 3px solid var(--color-border); margin: 1rem 0; padding: 0.5rem 1rem; font-style: italic; }
|
|
922
|
+
q { font-style: italic; }
|
|
923
|
+
|
|
924
|
+
/* Section spacing */
|
|
925
|
+
section, .example { margin: 1.5rem 0; }
|
|
926
|
+
|
|
927
|
+
/* ── DITAMAP tree view ── */
|
|
928
|
+
|
|
929
|
+
.ditamap-container {
|
|
930
|
+
padding: 0 0.5rem;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.map-title {
|
|
934
|
+
font-size: 1.6em;
|
|
935
|
+
font-weight: 600;
|
|
936
|
+
margin: 0 0 1rem 0;
|
|
937
|
+
padding-bottom: 0.3em;
|
|
938
|
+
border-bottom: 2px solid var(--color-border);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/* BookMap title page: mainbooktitle headline with booktitlealt/subtitle beneath */
|
|
942
|
+
.book-titlepage {
|
|
943
|
+
margin: 0 0 1.25rem 0;
|
|
944
|
+
padding-bottom: 0.4em;
|
|
945
|
+
border-bottom: 2px solid var(--color-border);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.book-titlepage .map-title {
|
|
949
|
+
margin: 0;
|
|
950
|
+
padding-bottom: 0;
|
|
951
|
+
border-bottom: none;
|
|
952
|
+
font-size: 1.9em;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
.book-subtitle {
|
|
956
|
+
margin: 0.2em 0 0 0;
|
|
957
|
+
font-size: 1.05em;
|
|
958
|
+
font-style: italic;
|
|
959
|
+
opacity: 0.75;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/* ── Book view: a whole .ditamap's topics on one page ── */
|
|
963
|
+
|
|
964
|
+
.dita-book {
|
|
965
|
+
padding: 0 0.5rem;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.dita-book-titlepage {
|
|
969
|
+
margin: 0 0 2rem 0;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
.dita-book-title {
|
|
973
|
+
margin: 0;
|
|
974
|
+
font-size: 1.9em;
|
|
975
|
+
font-weight: 600;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.dita-book-topic {
|
|
979
|
+
margin: 0 0 2.5rem 0;
|
|
980
|
+
padding-bottom: 2rem;
|
|
981
|
+
border-bottom: 1px solid var(--dita-border, currentColor);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.dita-book-topic:last-child {
|
|
985
|
+
border-bottom: none;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
/* BookMap division label above a topic's own title ("Chapter 1", "第 1 章"). */
|
|
989
|
+
.dita-book-role {
|
|
990
|
+
margin: 0 0 0.35rem 0;
|
|
991
|
+
font-size: 0.78em;
|
|
992
|
+
font-weight: 600;
|
|
993
|
+
letter-spacing: 0.05em;
|
|
994
|
+
text-transform: uppercase;
|
|
995
|
+
color: var(--dita-fg-muted, inherit);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.dita-book-division {
|
|
999
|
+
margin: 2.5rem 0 1rem 0;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
.dita-book-division-title {
|
|
1003
|
+
margin: 0;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.dita-book-missing,
|
|
1007
|
+
.dita-book-error {
|
|
1008
|
+
margin: 1rem 0;
|
|
1009
|
+
padding: 0.5rem 0.75rem;
|
|
1010
|
+
border-left: 3px solid var(--dita-border, currentColor);
|
|
1011
|
+
color: var(--dita-fg-muted, inherit);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
/* ── Site view: one topic per page, with a host-rendered sidebar ── */
|
|
1015
|
+
|
|
1016
|
+
/* One page beside a sidebar is not a full-pane reading page: start it at the
|
|
1017
|
+
same top padding as the host's sidebar header instead of the 2rem reading
|
|
1018
|
+
padding on .dita-body, so the page and sidebar line up. */
|
|
1019
|
+
.dita-body.dita-body--site {
|
|
1020
|
+
padding-top: 0.75rem;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.dita-site-page {
|
|
1024
|
+
padding: 0 0.5rem;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/* BookMap division label above the page's own title ("Chapter 1", "第 1 章"). */
|
|
1028
|
+
.dita-site-role {
|
|
1029
|
+
margin: 0 0 0.35rem 0;
|
|
1030
|
+
font-size: 0.78em;
|
|
1031
|
+
font-weight: 600;
|
|
1032
|
+
letter-spacing: 0.05em;
|
|
1033
|
+
text-transform: uppercase;
|
|
1034
|
+
color: var(--dita-fg-muted, inherit);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.dita-site-empty,
|
|
1038
|
+
.dita-site-missing,
|
|
1039
|
+
.dita-site-error {
|
|
1040
|
+
margin: 1rem 0;
|
|
1041
|
+
padding: 0.5rem 0.75rem;
|
|
1042
|
+
border-left: 3px solid var(--dita-border, currentColor);
|
|
1043
|
+
color: var(--dita-fg-muted, inherit);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.dita-site-missing code {
|
|
1047
|
+
background: var(--dita-code-inline-bg, var(--dita-code-bg, transparent));
|
|
1048
|
+
color: inherit;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.map-tree {
|
|
1052
|
+
list-style: none;
|
|
1053
|
+
padding-left: 1.2em;
|
|
1054
|
+
margin: 0.25em 0;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
.map-tree--inline {
|
|
1058
|
+
padding-left: 0;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.map-tree-item {
|
|
1062
|
+
margin: 0.15em 0;
|
|
1063
|
+
padding: 0.25em 0.4em;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.map-tree-item--nav {
|
|
1067
|
+
cursor: pointer;
|
|
1068
|
+
border-radius: 4px;
|
|
1069
|
+
margin-left: -0.4em;
|
|
1070
|
+
transition: background-color 0.1s ease;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.map-tree-item--nav:hover {
|
|
1074
|
+
background-color: var(--dita-hover-bg, rgba(128, 128, 128, 0.1));
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
.map-tree-item--keydef {
|
|
1078
|
+
opacity: 0.7;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.map-tree-item--head {
|
|
1082
|
+
font-weight: 600;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.map-tree-item--group {
|
|
1086
|
+
border-left: 2px solid var(--color-border);
|
|
1087
|
+
padding-left: 0.5em;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.map-tree-icon {
|
|
1091
|
+
margin-right: 0.35em;
|
|
1092
|
+
font-size: 0.9em;
|
|
1093
|
+
user-select: none;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/* BookMap role badge (Chapter / Appendix / Part …) */
|
|
1097
|
+
.map-tree-badge {
|
|
1098
|
+
display: inline-block;
|
|
1099
|
+
margin-right: 0.45em;
|
|
1100
|
+
padding: 0.05em 0.45em;
|
|
1101
|
+
border-radius: 3px;
|
|
1102
|
+
font-size: 0.72em;
|
|
1103
|
+
font-weight: 600;
|
|
1104
|
+
letter-spacing: 0.03em;
|
|
1105
|
+
text-transform: uppercase;
|
|
1106
|
+
color: var(--color-link, #4a76c9);
|
|
1107
|
+
border: 1px solid currentColor;
|
|
1108
|
+
opacity: 0.85;
|
|
1109
|
+
vertical-align: 0.1em;
|
|
1110
|
+
user-select: none;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
.map-tree-link {
|
|
1114
|
+
color: var(--color-link);
|
|
1115
|
+
text-decoration: none;
|
|
1116
|
+
display: inline-flex;
|
|
1117
|
+
align-items: center;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
.map-tree-link:hover {
|
|
1121
|
+
text-decoration: underline;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.map-tree-label {
|
|
1125
|
+
vertical-align: middle;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.map-tree-label--keydef {
|
|
1129
|
+
font-style: italic;
|
|
1130
|
+
color: var(--dita-fg);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
.map-tree-label--head {
|
|
1134
|
+
font-weight: 600;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/* Reltable */
|
|
1138
|
+
.map-reltable {
|
|
1139
|
+
margin-top: 1.5rem;
|
|
1140
|
+
padding-top: 1rem;
|
|
1141
|
+
border-top: 1px solid var(--color-border);
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
.map-reltable-title {
|
|
1145
|
+
font-size: 1.1em;
|
|
1146
|
+
margin: 0 0 0.5rem 0;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.map-reltable-table {
|
|
1150
|
+
width: 100%;
|
|
1151
|
+
border-collapse: collapse;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
.relheader th {
|
|
1155
|
+
font-weight: 600;
|
|
1156
|
+
background: var(--color-code-bg);
|
|
1157
|
+
color: var(--dita-fg);
|
|
1158
|
+
padding: 0.4rem 0.6rem;
|
|
1159
|
+
border: 1px solid var(--color-border);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
.relrow td {
|
|
1163
|
+
padding: 0.4rem 0.6rem;
|
|
1164
|
+
border: 1px solid var(--color-border);
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
.relcell-content {
|
|
1168
|
+
display: block;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
} /* @layer dv-base */
|