返回 DeepSeek-Reasonix
TurnNavigator.css
根目录 / desktop / frontend / src / components / harness-chat / TurnNavigator.css
1 /* Overlay slot, like the back-to-bottom control: the rail floats
2 over the transcript's right gutter without extending scrollHeight. */
3 .dsh-TurnNavigator-slot {
4 position: absolute;
5 inset: 0 12px 0 auto;
6 width: 28px;
7 z-index: 7;
8 pointer-events: none;
9 }
10 .dsh-TurnNavigator-frame {
11 --turn-natural-height: 0px;
12 --turn-natural-position: 0px;
13 --turn-rail-inset: 6px;
14 --turn-preview-height: 100px;
15 position: absolute;
16 top: 50%;
17 right: 0;
18 width: 28px;
19 height: min(var(--turn-natural-height), max(0px, calc(100% - 64px)), 420px);
20 cursor: pointer;
21 pointer-events: auto;
22 transform: translateY(-50%);
23 }
24
25 /* The frame's inner scroller: no visible scrollbar, no scroll chaining into
26 the transcript, and gradient fades over the ends that can still scroll. */
27 .dsh-TurnNavigator-scroller {
28 position: absolute;
29 inset: 0;
30 overflow-y: auto;
31 overscroll-behavior: contain;
32 scrollbar-width: none;
33 }
34
35 .dsh-TurnNavigator-scroller::-webkit-scrollbar {
36 display: none;
37 }
38
39 .dsh-TurnNavigator-fadeTop {
40 mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 100%);
41 }
42
43 .dsh-TurnNavigator-fadeBottom {
44 mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 24px), transparent 100%);
45 }
46
47 .dsh-TurnNavigator-fadeTop.dsh-TurnNavigator-fadeBottom {
48 mask-image: linear-gradient(
49 to bottom,
50 transparent 0,
51 #000 24px,
52 #000 calc(100% - 24px),
53 transparent 100%
54 );
55 }
56
57 .dsh-TurnNavigator-marks {
58 position: relative;
59 height: var(--turn-natural-height);
60 }
61
62 .dsh-TurnNavigator-markPosition {
63 position: absolute;
64 top: calc(var(--turn-natural-position) + var(--turn-rail-inset));
65 right: 0;
66 left: 0;
67 height: 10px;
68 transform: translateY(-50%);
69 transition: top 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
70 animation: dsh-turn-mark-enter 150ms ease-out;
71 }
72
73 /* The rail owns pointer input for the whole column, so a mark is a keyboard
74 destination that paints one tick — never a mouse target of its own. */
75 .dsh-TurnNavigator-mark {
76 position: absolute;
77 /* As wide as the longest tick, right-aligned with it: the focus ring below
78 then wraps the tick instead of the rail's full pointer column. */
79 inset: 0 0 0 auto;
80 width: 20px;
81 padding: 0;
82 border: 0;
83 border-radius: 8px;
84 background: transparent;
85 cursor: pointer;
86 pointer-events: none;
87 }
88
89 .dsh-TurnNavigator-mark::before {
90 position: absolute;
91 top: 50%;
92 right: 0;
93 width: 12px;
94 height: 2px;
95 border-radius: 2px;
96 background: var(--border);
97 content: '';
98 transform: translateY(-50%);
99 transition: width 140ms ease, background-color 140ms ease;
100 }
101
102 /* Ordered before hover/active so those states keep their stronger tick. */
103 .dsh-TurnNavigator-markUnloaded::before {
104 width: 8px;
105 opacity: 0.6;
106 }
107
108 .dsh-TurnNavigator-markPreview::before {
109 width: 18px;
110 }
111
112 .dsh-TurnNavigator-markBusy::before {
113 animation: dsh-turn-mark-busy 1s ease-in-out infinite;
114 }
115
116 .dsh-TurnNavigator-markActive::before {
117 width: 20px;
118 background: var(--accent);
119 }
120
121 /* Preserve the v1.38.7 question rail's theme hierarchy while retaining the
122 Harness fixed-pitch geometry: the hovered mark and its two neighbours fade
123 through the configured accent, and the resting active mark stays accented. */
124 .dsh-TurnNavigator-mark[data-preview-distance='2']::before {
125 background: color-mix(in srgb, var(--accent) 35%, transparent);
126 }
127
128 .dsh-TurnNavigator-mark[data-preview-distance='1']::before {
129 background: color-mix(in srgb, var(--accent) 60%, transparent);
130 }
131
132 .dsh-TurnNavigator-mark[data-preview-distance='0']::before {
133 background: var(--accent);
134 }
135
136 /* Keyboard focus outranks both resting states: the tick takes the brand color
137 the rest of the rail never uses, and a hairline ring keeps it legible
138 against a busy transcript. */
139 .dsh-TurnNavigator-mark:focus-visible::before {
140 width: 20px;
141 background: var(--accent);
142 }
143
144 .dsh-TurnNavigator-mark:focus-visible {
145 outline: 1px solid var(--accent);
146 outline-offset: 2px;
147 }
148
149 .dsh-TurnNavigator-preview {
150 position: absolute;
151 /* Centered on its mark. Mark positions live in the scrolled ladder, so the
152 frame-level preview subtracts the scroller's offset, then holds clear of
153 both frame ends. */
154 top: clamp(
155 0px,
156 calc(
157 var(--turn-natural-position) + var(--turn-rail-inset)
158 - var(--turn-scroll-top, 0px) - var(--turn-preview-height) / 2
159 ),
160 calc(100% - var(--turn-preview-height))
161 );
162 right: calc(100% + 10px);
163 box-sizing: border-box;
164 width: min(300px, calc(100cqw - 120px));
165 max-height: var(--turn-preview-height);
166 overflow: hidden;
167 padding: 10px 12px;
168 border: 0;
169 border-radius: 10px;
170 color: var(--dsw-alias-label-primary);
171 background: var(--bg-elev);
172 box-shadow: 0 4px 20px #0002;
173 pointer-events: none;
174 animation: dsh-turn-preview-enter 120ms ease-out;
175 transition: top 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
176 }
177
178 .dsh-TurnNavigator-previewPrompt,
179 .dsh-TurnNavigator-previewResponse {
180 display: -webkit-box;
181 overflow: hidden;
182 -webkit-box-orient: vertical;
183 }
184
185 .dsh-TurnNavigator-previewPrompt {
186 font: 600 13px/20px var(--font-ui);
187 -webkit-line-clamp: 1;
188 }
189
190 .dsh-TurnNavigator-previewResponse {
191 margin-top: 4px;
192 color: var(--dsw-alias-label-caption);
193 font: 400 12px/18px var(--font-ui);
194 -webkit-line-clamp: 3;
195 }
196
197 @keyframes dsh-turn-mark-enter {
198 from { opacity: 0; }
199 to { opacity: 1; }
200 }
201
202 @keyframes dsh-turn-preview-enter {
203 from { opacity: 0; transform: translateX(4px); }
204 to { opacity: 1; transform: translateX(0); }
205 }
206
207 @keyframes dsh-turn-mark-busy {
208 0%,
209 100% { opacity: 1; }
210 50% { opacity: 0.35; }
211 }
212
213
214
215 @media (prefers-reduced-motion: reduce) {
216 .dsh-TurnNavigator-frame,
217 .dsh-TurnNavigator-scroller,
218 .dsh-TurnNavigator-markPosition,
219 .dsh-TurnNavigator-mark::before,
220 .dsh-TurnNavigator-markBusy::before,
221 .dsh-TurnNavigator-preview {
222 transition: none;
223 animation: none;
224 scroll-behavior: auto;
225 }
226 }
227
227 lines CSS