|
24 | 24 | // (or a relative unit for headings). Centralising the scale here keeps the |
25 | 25 | // panel coherent across cards: tool indicators, diff cards, confirm dialogs, |
26 | 26 | // the proposed plan, etc. all read as one product instead of independently |
27 | | -// styled fragments. |
28 | | -@ai-text-body: @sidebar-content-font-size; // 13px — message content, tool labels, prose |
| 27 | +// styled fragments. Body is 14px (one tick larger than Phoenix's 13px sidebar |
| 28 | +// default) so prose breathes more — closer to what users get from Lovable |
| 29 | +// /ChatGPT/Claude desktop. Secondary and meta stay at the smaller tiers. |
| 30 | +@ai-text-body: @menu-item-font-size; // 14px — message content, tool labels, prose |
29 | 31 | @ai-text-secondary: @sidebar-small-font-size; // 12px — in-card buttons, mono code, file paths |
30 | 32 | @ai-text-meta: @sidebar-xs-font-size; // 11px — stats, status, permission/context info |
31 | | -@ai-line-prose: 1.55; // multi-line body text |
| 33 | +@ai-line-prose: 1.6; // multi-line body text — generous reading rhythm |
32 | 34 | @ai-line-compact: 1.4; // single-line UI elements |
33 | 35 |
|
34 | 36 | .ai-tab-container { |
|
268 | 270 | flex: 1; |
269 | 271 | overflow-y: auto; |
270 | 272 | overflow-x: hidden; |
271 | | - padding: 8px 10px; |
| 273 | + padding: 12px 14px; |
272 | 274 | min-height: 0; |
273 | 275 | min-width: 0; |
274 | 276 | -webkit-user-select: text; |
|
279 | 281 |
|
280 | 282 | /* ── Individual messages ────────────────────────────────────────────── */ |
281 | 283 | .ai-msg { |
282 | | - margin-bottom: 12px; |
| 284 | + margin-bottom: 16px; |
283 | 285 | max-width: 100%; |
284 | 286 | // Skip layout / paint for messages that are far off-screen. For a large |
285 | 287 | // chat history (>1k messages, >10k DOM nodes), showing the sidebar after |
|
297 | 299 |
|
298 | 300 | .ai-msg-content { |
299 | 301 | font-size: @ai-text-body; |
300 | | - line-height: 1.55; |
| 302 | + line-height: @ai-line-prose; |
301 | 303 | white-space: normal; |
302 | 304 | word-wrap: break-word; |
303 | 305 | overflow-wrap: anywhere; |
|
320 | 322 |
|
321 | 323 | .ai-msg-content { |
322 | 324 | background-color: rgba(255, 255, 255, 0.07); |
323 | | - padding: 6px 10px; |
324 | | - border-radius: 10px 10px 2px 10px; |
| 325 | + padding: 8px 12px; |
| 326 | + border-radius: 12px 12px 2px 12px; |
325 | 327 | max-width: 88%; |
326 | 328 | text-align: left; |
327 | 329 | } |
|
400 | 402 | .ai-msg-assistant { |
401 | 403 | .ai-msg-content { |
402 | 404 | padding: 2px 0; |
| 405 | + line-height: @ai-line-prose; |
403 | 406 |
|
404 | 407 | > *:first-child { |
405 | 408 | margin-top: 0; |
|
409 | 412 | margin-bottom: 0; |
410 | 413 | } |
411 | 414 |
|
| 415 | + // Paragraph margin tuned to roughly match a single line of prose |
| 416 | + // so paragraphs read as separated but still related. |
412 | 417 | p { |
413 | | - margin: 0 0 8px 0; |
| 418 | + margin: 0 0 14px 0; |
414 | 419 |
|
415 | 420 | &:last-child { |
416 | 421 | margin-bottom: 0; |
|
425 | 430 | code { |
426 | 431 | background-color: rgba(255, 255, 255, 0.08); |
427 | 432 | color: @project-panel-text-1; |
428 | | - padding: 1px 4px; |
| 433 | + padding: 1px 5px; |
429 | 434 | border-radius: 3px; |
430 | 435 | font-size: @sidebar-md-code-font-size; |
431 | 436 | font-family: 'SourceCodePro-Medium', 'SourceCodePro', monospace; |
|
434 | 439 | pre { |
435 | 440 | background-color: rgba(0, 0, 0, 0.3); |
436 | 441 | border: 1px solid rgba(255, 255, 255, 0.06); |
437 | | - padding: 8px 10px; |
| 442 | + padding: 10px 12px; |
438 | 443 | border-radius: 4px; |
439 | 444 | overflow-x: auto; |
440 | | - margin: 6px 0; |
| 445 | + margin: 10px 0 12px; |
441 | 446 | position: relative; |
442 | 447 |
|
443 | 448 | &.collapsed code { |
|
451 | 456 | padding: 0; |
452 | 457 | border-radius: 0; |
453 | 458 | font-size: 1em; |
454 | | - line-height: 1.5; |
| 459 | + line-height: 1.55; |
455 | 460 | color: @project-panel-text-1; |
456 | 461 | } |
457 | 462 | } |
458 | 463 |
|
| 464 | + // Lists: visible vertical gap between items so they breathe but |
| 465 | + // stay grouped. Block-level margin top/bottom matches a paragraph. |
459 | 466 | ul, ol { |
460 | | - margin: 4px 0 8px 0; |
461 | | - padding-left: 18px; |
| 467 | + margin: 8px 0 14px 0; |
| 468 | + padding-left: 20px; |
462 | 469 | } |
463 | 470 |
|
464 | 471 | li { |
465 | | - margin-bottom: 2px; |
| 472 | + margin-bottom: 6px; |
| 473 | + // Brackets' default li rule clamps line-height to ~18px which |
| 474 | + // makes wrapped bullet text look squished against the prose |
| 475 | + // around it. Restore the prose rhythm explicitly. |
| 476 | + line-height: @ai-line-prose; |
| 477 | + |
| 478 | + &:last-child { |
| 479 | + margin-bottom: 0; |
| 480 | + } |
| 481 | + |
| 482 | + // Nested lists shouldn't double-space |
| 483 | + > ul, > ol { |
| 484 | + margin: 6px 0 0 0; |
| 485 | + } |
466 | 486 | } |
467 | 487 |
|
468 | 488 | blockquote { |
469 | 489 | border-left: 2px solid rgba(255, 255, 255, 0.12); |
470 | | - margin: 6px 0; |
471 | | - padding: 2px 10px; |
| 490 | + margin: 10px 0; |
| 491 | + padding: 4px 12px; |
472 | 492 | color: @project-panel-text-2; |
473 | 493 | } |
474 | 494 |
|
|
527 | 547 | } |
528 | 548 |
|
529 | 549 | /* ── Tool use indicator ─────────────────────────────────────────────── */ |
| 550 | +// Tool indicators are factual breadcrumbs, not the main signal. Keep them |
| 551 | +// visually quieter than prose so the eye lands on the assistant's text |
| 552 | +// first. Background and border alphas tuned down from earlier values. |
530 | 553 | .ai-msg-tool { |
531 | | - margin-bottom: 5px; |
| 554 | + margin-bottom: 6px; |
532 | 555 | border-radius: 4px; |
533 | | - background-color: rgba(255, 255, 255, 0.025); |
534 | | - border: 1px solid rgba(255, 255, 255, 0.04); |
| 556 | + background-color: rgba(255, 255, 255, 0.02); |
| 557 | + border: 1px solid rgba(255, 255, 255, 0.025); |
535 | 558 | border-left: 2px solid var(--tool-color, @project-panel-text-2); |
536 | 559 |
|
537 | 560 | // Add a small breather between consecutive tool indicators so a stack |
|
891 | 914 | /* ── Edit summary card ──────────────────────────────────────────────── */ |
892 | 915 | .ai-msg-edit-summary { |
893 | 916 | border: 1px solid rgba(255, 255, 255, 0.08); |
894 | | - border-radius: 4px; |
895 | | - margin-bottom: 6px; |
896 | | - padding: 6px 10px; |
| 917 | + border-radius: 6px; |
| 918 | + margin: 8px 0 12px 0; |
| 919 | + padding: 10px 12px; |
897 | 920 | background-color: rgba(255, 255, 255, 0.025); |
898 | 921 |
|
899 | 922 | .ai-edit-summary-header { |
|
1332 | 1355 | } |
1333 | 1356 |
|
1334 | 1357 | .ai-plan-body { |
1335 | | - padding: 10px 12px; |
| 1358 | + padding: 14px 16px; |
1336 | 1359 | font-size: @ai-text-body; |
1337 | 1360 | color: @project-panel-text-1; |
1338 | | - line-height: 1.5; |
| 1361 | + line-height: @ai-line-prose; |
1339 | 1362 | white-space: normal; |
1340 | 1363 | word-wrap: break-word; |
1341 | | - max-height: 400px; |
| 1364 | + max-height: 460px; |
1342 | 1365 | overflow-y: auto; |
1343 | 1366 |
|
1344 | 1367 | p, ul, ol, pre { |
1345 | | - margin-bottom: 8px; |
| 1368 | + margin-bottom: 14px; |
1346 | 1369 | &:last-child { |
1347 | 1370 | margin-bottom: 0; |
1348 | 1371 | } |
1349 | 1372 | } |
1350 | 1373 |
|
| 1374 | + // Heading top margin needs to be larger than paragraph margin so a |
| 1375 | + // section header reads as a section header rather than another bullet. |
1351 | 1376 | h1, h2, h3, h4 { |
1352 | 1377 | color: @project-panel-text-1; |
1353 | 1378 | line-height: 1.25em; |
1354 | 1379 | } |
1355 | 1380 |
|
1356 | 1381 | h1 { |
1357 | 1382 | font-size: @sidebar-md-h1-font-size; |
1358 | | - margin: 12px 0 4px 0; |
| 1383 | + margin: 18px 0 8px 0; |
1359 | 1384 | padding-bottom: .3em; |
1360 | 1385 | } |
1361 | 1386 | h2 { |
1362 | 1387 | font-size: @sidebar-md-h2-font-size; |
1363 | | - margin: 10px 0 4px 0; |
| 1388 | + margin: 16px 0 8px 0; |
1364 | 1389 | padding-bottom: .3em; |
1365 | 1390 | } |
1366 | | - h3 { font-size: @sidebar-md-h3-font-size; margin: 8px 0 4px 0; } |
1367 | | - h4 { font-size: @sidebar-md-h4-font-size; margin: 6px 0 4px 0; opacity: 0.85; } |
| 1391 | + h3 { font-size: @sidebar-md-h3-font-size; margin: 14px 0 6px 0; } |
| 1392 | + h4 { font-size: @sidebar-md-h4-font-size; margin: 12px 0 6px 0; opacity: 0.85; } |
1368 | 1393 |
|
1369 | 1394 | strong { |
1370 | 1395 | color: @project-panel-text-1; |
|
1376 | 1401 |
|
1377 | 1402 | blockquote { |
1378 | 1403 | border-left: 3px solid rgba(107, 158, 255, 0.3); |
1379 | | - margin: 6px 0; |
1380 | | - padding: 2px 10px; |
| 1404 | + margin: 10px 0; |
| 1405 | + padding: 4px 12px; |
1381 | 1406 | color: @project-panel-text-2; |
1382 | 1407 | } |
1383 | 1408 |
|
1384 | 1409 | code { |
1385 | 1410 | background-color: rgba(255, 255, 255, 0.08); |
1386 | 1411 | color: @project-panel-text-1; |
1387 | | - padding: 1px 4px; |
| 1412 | + padding: 1px 5px; |
1388 | 1413 | border-radius: 3px; |
1389 | 1414 | font-size: @sidebar-md-code-font-size; |
1390 | 1415 | font-family: 'SourceCodePro-Medium', 'SourceCodePro', monospace; |
|
1393 | 1418 | pre { |
1394 | 1419 | background-color: rgba(0, 0, 0, 0.3); |
1395 | 1420 | border: 1px solid rgba(255, 255, 255, 0.06); |
1396 | | - padding: 8px 10px; |
| 1421 | + padding: 10px 12px; |
1397 | 1422 | border-radius: 4px; |
1398 | 1423 | overflow-x: auto; |
1399 | 1424 | position: relative; |
|
1407 | 1432 | padding: 0; |
1408 | 1433 | border-radius: 0; |
1409 | 1434 | font-size: 1em; |
1410 | | - line-height: 1.5; |
| 1435 | + line-height: 1.55; |
1411 | 1436 | color: @project-panel-text-1; |
1412 | 1437 | } |
1413 | 1438 | } |
1414 | 1439 |
|
1415 | 1440 | ul, ol { |
1416 | | - margin: 4px 0 8px 0; |
1417 | | - padding-left: 18px; |
| 1441 | + margin: 8px 0 14px 0; |
| 1442 | + padding-left: 22px; |
1418 | 1443 | } |
1419 | 1444 |
|
1420 | 1445 | li { |
1421 | | - margin-bottom: 2px; |
| 1446 | + margin-bottom: 6px; |
| 1447 | + // Same line-height fix as the assistant message — Brackets' |
| 1448 | + // default li rule clamps line-height too tight otherwise. |
| 1449 | + line-height: @ai-line-prose; |
| 1450 | + |
| 1451 | + &:last-child { |
| 1452 | + margin-bottom: 0; |
| 1453 | + } |
| 1454 | + |
| 1455 | + > ul, > ol { |
| 1456 | + margin: 6px 0 0 0; |
| 1457 | + } |
1422 | 1458 | } |
1423 | 1459 | } |
1424 | 1460 |
|
|
2206 | 2242 | color: @project-panel-text-1; |
2207 | 2243 | font-size: @ai-text-body; |
2208 | 2244 | font-family: inherit; |
2209 | | - padding: 7px 0 7px 10px; |
| 2245 | + padding: 10px 0 10px 12px; |
2210 | 2246 | margin: 0; |
2211 | 2247 | resize: none; |
2212 | | - min-height: 20px; |
2213 | | - max-height: 96px; |
2214 | | - line-height: 1.4; |
| 2248 | + min-height: 24px; |
| 2249 | + max-height: 120px; |
| 2250 | + line-height: @ai-line-compact; |
2215 | 2251 | outline: none !important; |
2216 | 2252 | box-shadow: none !important; |
2217 | 2253 |
|
|
0 commit comments