File size: 2,757 Bytes
966d483
 
 
 
ca22571
 
966d483
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ca22571
 
 
 
966d483
 
 
 
 
 
ca22571
 
 
 
 
966d483
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
/* Extension-only: underline overlay + Custom Highlight.
 * Find bar lives in Shadow DOM (see content.js).
 *
 * token / truncated:CSS Custom Highlight API(不改 DOM、不垫字下)
 * underline(导航)/ pending-underline:#il-overlay-host 盖层,可叠画;统一蓝
 * pending:等待染色;若最终无红色 token,则留下作 chunk 级匹配标记
 */

#il-overlay-host {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 2147483644;
}

/* SYNC: client/src/shared/vis/constants.ts → HIGHLIGHT_CONSTANTS
 * UNDERLINE_WIDTH=2, HIGHLIGHT_COLOR fallback #1e6fff
 * pending:等待染色 / 无 token 时的 chunk 匹配标记;与导航线同色,下移叠画、生命周期互不干涉 */
.il-chunk-underline,
.il-chunk-underline-pending {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  height: 2px;
  border-radius: 2px;
  background: #1e6fff;
}
/* 相对导航线下移 2px(=线高),同位叠画时紧贴、不被盖住 */
.il-chunk-underline-pending {
  transform: translateY(2px);
}

/*
 * token:16 档 background-color。
 * SYNC: SurprisalColorConfig → SURPRISAL_RED_RGB / SURPRISAL_MAX_ALPHA(0.7)
 * alpha = ((level+1)/16) * 0.7
 */
::highlight(il-token-0) {
  background-color: rgba(255, 71, 64, 0.04375);
}
::highlight(il-token-1) {
  background-color: rgba(255, 71, 64, 0.0875);
}
::highlight(il-token-2) {
  background-color: rgba(255, 71, 64, 0.13125);
}
::highlight(il-token-3) {
  background-color: rgba(255, 71, 64, 0.175);
}
::highlight(il-token-4) {
  background-color: rgba(255, 71, 64, 0.21875);
}
::highlight(il-token-5) {
  background-color: rgba(255, 71, 64, 0.2625);
}
::highlight(il-token-6) {
  background-color: rgba(255, 71, 64, 0.30625);
}
::highlight(il-token-7) {
  background-color: rgba(255, 71, 64, 0.35);
}
::highlight(il-token-8) {
  background-color: rgba(255, 71, 64, 0.39375);
}
::highlight(il-token-9) {
  background-color: rgba(255, 71, 64, 0.4375);
}
::highlight(il-token-10) {
  background-color: rgba(255, 71, 64, 0.48125);
}
::highlight(il-token-11) {
  background-color: rgba(255, 71, 64, 0.525);
}
::highlight(il-token-12) {
  background-color: rgba(255, 71, 64, 0.56875);
}
::highlight(il-token-13) {
  background-color: rgba(255, 71, 64, 0.6125);
}
::highlight(il-token-14) {
  background-color: rgba(255, 71, 64, 0.65625);
}
::highlight(il-token-15) {
  background-color: rgba(255, 71, 64, 0.7);
}

/*
 * 未分析后缀置灰:统一灰(不跟链接/标题各自字色)。
 * CanvasText / Canvas 随色彩方案变,深浅色均可读。
 */
::highlight(il-truncated) {
  color: color-mix(in srgb, CanvasText 40%, Canvas 60%);
}