@dita-viewer/core 0.2.4 → 0.2.5

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.
@@ -55,6 +55,12 @@
55
55
  --color-comment-border: #c4c4c4;
56
56
  --color-comment-text: #6b6b6b;
57
57
  --color-menucascade-arrow: #767676;
58
+ /* Broken-reference hints (.ref-error / .xref-broken): a muted rose that
59
+ reads as an error without shouting -- distinct from the orange
60
+ unresolved-keyref chip and the red danger callout. */
61
+ --color-ref-error-bg: #f8efee;
62
+ --color-ref-error-fg: #97534a;
63
+ --color-ref-error-border: #dfc1bb;
58
64
  }
59
65
 
60
66
  .vscode-dark, :host([data-scheme="dark"]) {
@@ -78,6 +84,10 @@
78
84
  --color-comment-border: #4d4d4d;
79
85
  --color-comment-text: #9a9a9a;
80
86
  --color-menucascade-arrow: #aaaaaa;
87
+ /* Semi-transparent rose over the dark canvas, same hue family as light. */
88
+ --color-ref-error-bg: rgba(224, 133, 120, 0.12);
89
+ --color-ref-error-fg: #d99a90;
90
+ --color-ref-error-border: rgba(224, 133, 120, 0.45);
81
91
  }
82
92
 
83
93
  body, .dita-body {
@@ -864,6 +874,35 @@ pre code { background: none; padding: 0; border-radius: 0; }
864
874
  .xref { color: var(--color-link); text-decoration: none; }
865
875
  .xref:hover { text-decoration: underline; }
866
876
  .xref-external { font-style: italic; font-size: 0.9em; opacity: 0.7; }
877
+ /* Broken-reference hints (RenderContext.refError). A conref that pulled
878
+ nothing renders as a dashed placeholder chip in place of the silently
879
+ empty element; an empty xref whose target is gone keeps the arrow hint
880
+ but reads as an error. Both carry the raw reference in title= and the
881
+ referencing element's data-line range, so click-to-source and diff
882
+ highlighting keep working on them. */
883
+ .ref-error {
884
+ display: inline-block;
885
+ padding: 0 0.4em;
886
+ border: 1px dashed var(--color-ref-error-border);
887
+ border-radius: 4px;
888
+ background: var(--color-ref-error-bg);
889
+ color: var(--color-ref-error-fg);
890
+ font-size: 0.9em;
891
+ font-style: normal;
892
+ cursor: help;
893
+ }
894
+ /* The same chip in a block, list or table slot (see renderRefErrorPlaceholder):
895
+ inline-block would drop the list marker and break the table cell. */
896
+ div.ref-error { display: block; width: fit-content; }
897
+ li.ref-error { display: list-item; }
898
+ td.ref-error { display: table-cell; }
899
+ .xref-broken {
900
+ font-style: italic;
901
+ font-size: 0.9em;
902
+ color: var(--color-ref-error-fg);
903
+ border-bottom: 1px dashed var(--color-ref-error-fg);
904
+ cursor: help;
905
+ }
867
906
  .link { color: var(--color-link); text-decoration: none; }
868
907
  .link:hover { text-decoration: underline; }
869
908