|
5 | 5 | font-family: 'Consolas', 'Monaco', 'Courier New', monospace; |
6 | 6 | font-size: 13px; |
7 | 7 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| 8 | + display: flex; |
| 9 | + flex-direction: column; |
| 10 | + height: 100%; |
8 | 11 | } |
9 | 12 |
|
10 | 13 | .code-header { |
|
33 | 36 | .code-content { |
34 | 37 | display: flex; |
35 | 38 | overflow-x: auto; |
36 | | - max-height: 600px; |
| 39 | + flex: 1; |
37 | 40 | overflow-y: auto; |
38 | 41 | } |
39 | 42 |
|
|
44 | 47 | background-color: #252526; |
45 | 48 | border-right: 1px solid #3d3d3d; |
46 | 49 | user-select: none; |
47 | | - min-width: 40px; |
| 50 | + min-width: 50px; |
48 | 51 | } |
49 | 52 |
|
50 | 53 | .line-number { |
51 | | - padding: 0 12px; |
| 54 | + padding: 0 8px 0 12px; |
52 | 55 | color: #858585; |
53 | 56 | text-align: right; |
54 | 57 | line-height: 1.6; |
55 | 58 | font-size: 12px; |
| 59 | + display: flex; |
| 60 | + align-items: center; |
| 61 | + justify-content: flex-end; |
| 62 | + gap: 4px; |
| 63 | +} |
| 64 | + |
| 65 | +.line-number.execution-line { |
| 66 | + background-color: rgba(255, 235, 59, 0.1); |
| 67 | + color: #ffeb3b; |
| 68 | +} |
| 69 | + |
| 70 | +.execution-arrow { |
| 71 | + color: #ffeb3b; |
| 72 | + font-size: 10px; |
| 73 | + animation: pulse-arrow 1s ease-in-out infinite; |
| 74 | +} |
| 75 | + |
| 76 | +@keyframes pulse-arrow { |
| 77 | + 0%, 100% { opacity: 1; } |
| 78 | + 50% { opacity: 0.5; } |
56 | 79 | } |
57 | 80 |
|
58 | 81 | .code-lines { |
|
69 | 92 | line-height: 1.6; |
70 | 93 | white-space: pre; |
71 | 94 | transition: background-color 0.3s ease; |
| 95 | + min-height: 21px; |
72 | 96 | } |
73 | 97 |
|
74 | 98 | .code-line.highlighted { |
75 | | - background-color: rgba(255, 235, 59, 0.15); |
76 | | - border-left: 3px solid #ffeb3b; |
77 | | - padding-left: 9px; |
78 | | - animation: highlight-pulse 1.5s ease-in-out infinite; |
| 99 | + background-color: rgba(255, 235, 59, 0.1); |
79 | 100 | } |
80 | 101 |
|
81 | | -@keyframes highlight-pulse { |
82 | | - 0%, 100% { |
83 | | - background-color: rgba(255, 235, 59, 0.15); |
84 | | - } |
85 | | - 50% { |
86 | | - background-color: rgba(255, 235, 59, 0.25); |
87 | | - } |
| 102 | +.code-line.execution { |
| 103 | + background-color: rgba(255, 235, 59, 0.2); |
| 104 | + border-left: 3px solid #ffeb3b; |
| 105 | + padding-left: 9px; |
88 | 106 | } |
89 | 107 |
|
90 | 108 | .code-text { |
91 | 109 | color: #d4d4d4; |
| 110 | + flex-shrink: 0; |
92 | 111 | } |
93 | 112 |
|
94 | | -.variable-value { |
95 | | - margin-left: 20px; |
| 113 | +/* 变量标注样式 */ |
| 114 | +.variable-annotations { |
| 115 | + display: inline-flex; |
| 116 | + gap: 8px; |
| 117 | + margin-left: 16px; |
| 118 | + flex-wrap: wrap; |
| 119 | +} |
| 120 | + |
| 121 | +.variable-tag { |
| 122 | + display: inline-flex; |
| 123 | + align-items: center; |
96 | 124 | padding: 2px 8px; |
97 | | - background-color: rgba(76, 175, 80, 0.2); |
98 | | - border: 1px solid #4caf50; |
99 | 125 | border-radius: 4px; |
100 | | - color: #4caf50; |
101 | 126 | font-size: 11px; |
102 | | - white-space: nowrap; |
103 | 127 | animation: fade-in 0.3s ease; |
| 128 | + white-space: nowrap; |
| 129 | +} |
| 130 | + |
| 131 | +.variable-tag.variable-node { |
| 132 | + background-color: rgba(33, 150, 243, 0.2); |
| 133 | + border: 1px solid #2196F3; |
| 134 | + color: #64B5F6; |
| 135 | +} |
| 136 | + |
| 137 | +.variable-tag.variable-value { |
| 138 | + background-color: rgba(156, 39, 176, 0.2); |
| 139 | + border: 1px solid #9C27B0; |
| 140 | + color: #CE93D8; |
| 141 | +} |
| 142 | + |
| 143 | +.variable-tag.variable-result { |
| 144 | + background-color: rgba(76, 175, 80, 0.2); |
| 145 | + border: 1px solid #4CAF50; |
| 146 | + color: #81C784; |
| 147 | +} |
| 148 | + |
| 149 | +.variable-tag.variable-size { |
| 150 | + background-color: rgba(255, 152, 0, 0.2); |
| 151 | + border: 1px solid #FF9800; |
| 152 | + color: #FFB74D; |
| 153 | +} |
| 154 | + |
| 155 | +.var-name { |
| 156 | + font-weight: 500; |
| 157 | +} |
| 158 | + |
| 159 | +.var-equals { |
| 160 | + margin: 0 4px; |
| 161 | + opacity: 0.7; |
| 162 | +} |
| 163 | + |
| 164 | +.var-value { |
| 165 | + font-weight: 600; |
104 | 166 | } |
105 | 167 |
|
106 | 168 | @keyframes fade-in { |
|
114 | 176 | } |
115 | 177 | } |
116 | 178 |
|
| 179 | +/* 旧的变量值样式(保留兼容) */ |
| 180 | +.variable-value { |
| 181 | + margin-left: 20px; |
| 182 | + padding: 2px 8px; |
| 183 | + background-color: rgba(76, 175, 80, 0.2); |
| 184 | + border: 1px solid #4caf50; |
| 185 | + border-radius: 4px; |
| 186 | + color: #4caf50; |
| 187 | + font-size: 11px; |
| 188 | + white-space: nowrap; |
| 189 | + animation: fade-in 0.3s ease; |
| 190 | +} |
| 191 | + |
| 192 | +/* 变量监视面板 */ |
| 193 | +.variables-panel { |
| 194 | + background-color: #252526; |
| 195 | + border-top: 1px solid #3d3d3d; |
| 196 | + padding: 10px 12px; |
| 197 | + min-height: 60px; |
| 198 | + max-height: 120px; |
| 199 | + overflow-y: auto; |
| 200 | + flex-shrink: 0; |
| 201 | +} |
| 202 | + |
| 203 | +.variables-header { |
| 204 | + display: flex; |
| 205 | + align-items: center; |
| 206 | + gap: 6px; |
| 207 | + color: #9cdcfe; |
| 208 | + font-size: 11px; |
| 209 | + font-weight: 600; |
| 210 | + margin-bottom: 8px; |
| 211 | + padding-bottom: 6px; |
| 212 | + border-bottom: 1px solid #3d3d3d; |
| 213 | +} |
| 214 | + |
| 215 | +.variables-icon { |
| 216 | + font-size: 12px; |
| 217 | +} |
| 218 | + |
| 219 | +.variables-list { |
| 220 | + display: flex; |
| 221 | + flex-wrap: wrap; |
| 222 | + gap: 8px 16px; |
| 223 | +} |
| 224 | + |
| 225 | +.variable-item { |
| 226 | + display: flex; |
| 227 | + align-items: center; |
| 228 | + font-size: 11px; |
| 229 | +} |
| 230 | + |
| 231 | +.variable-key { |
| 232 | + color: #9cdcfe; |
| 233 | + font-weight: 500; |
| 234 | +} |
| 235 | + |
| 236 | +.variable-separator { |
| 237 | + color: #666; |
| 238 | + margin: 0 4px; |
| 239 | +} |
| 240 | + |
| 241 | +.variable-val { |
| 242 | + font-weight: 600; |
| 243 | +} |
| 244 | + |
| 245 | +.variable-val.val-null { |
| 246 | + color: #569cd6; |
| 247 | +} |
| 248 | + |
| 249 | +.variable-val.val-true { |
| 250 | + color: #4ec9b0; |
| 251 | +} |
| 252 | + |
| 253 | +.variable-val.val-false { |
| 254 | + color: #f48771; |
| 255 | +} |
| 256 | + |
| 257 | +.variable-val.val-number { |
| 258 | + color: #b5cea8; |
| 259 | +} |
| 260 | + |
| 261 | +.variable-val.val-string { |
| 262 | + color: #ce9178; |
| 263 | +} |
| 264 | + |
117 | 265 | /* 语法高亮颜色 */ |
118 | 266 | .code-text .keyword { |
119 | 267 | color: #569cd6; |
|
145 | 293 | } |
146 | 294 |
|
147 | 295 | /* 滚动条样式 */ |
148 | | -.code-content::-webkit-scrollbar { |
| 296 | +.code-content::-webkit-scrollbar, |
| 297 | +.variables-panel::-webkit-scrollbar { |
149 | 298 | width: 8px; |
150 | 299 | height: 8px; |
151 | 300 | } |
152 | 301 |
|
153 | | -.code-content::-webkit-scrollbar-track { |
| 302 | +.code-content::-webkit-scrollbar-track, |
| 303 | +.variables-panel::-webkit-scrollbar-track { |
154 | 304 | background: #1e1e1e; |
155 | 305 | } |
156 | 306 |
|
157 | | -.code-content::-webkit-scrollbar-thumb { |
| 307 | +.code-content::-webkit-scrollbar-thumb, |
| 308 | +.variables-panel::-webkit-scrollbar-thumb { |
158 | 309 | background: #424242; |
159 | 310 | border-radius: 4px; |
160 | 311 | } |
161 | 312 |
|
162 | | -.code-content::-webkit-scrollbar-thumb:hover { |
| 313 | +.code-content::-webkit-scrollbar-thumb:hover, |
| 314 | +.variables-panel::-webkit-scrollbar-thumb:hover { |
163 | 315 | background: #555; |
164 | 316 | } |
165 | 317 |
|
|
174 | 326 | } |
175 | 327 |
|
176 | 328 | .line-number { |
177 | | - padding: 0 8px; |
178 | | - min-width: 30px; |
| 329 | + padding: 0 6px 0 8px; |
| 330 | + min-width: 40px; |
179 | 331 | } |
180 | 332 |
|
181 | 333 | .code-line { |
182 | 334 | padding: 0 8px; |
183 | 335 | } |
| 336 | + |
| 337 | + .variable-annotations { |
| 338 | + margin-left: 8px; |
| 339 | + } |
| 340 | + |
| 341 | + .variable-tag { |
| 342 | + padding: 1px 6px; |
| 343 | + font-size: 10px; |
| 344 | + } |
| 345 | + |
| 346 | + .variables-panel { |
| 347 | + max-height: 80px; |
| 348 | + } |
184 | 349 | } |
0 commit comments