WebBlock.module.css 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /* Geometry mirrors CodeBlock/TerminalBlock (12px radius, code-block surface,
  2. 16px vertical margin) so a web card, a terminal card, and a fenced code block
  3. read as one family. A source list is prose, not aligned output, so each row
  4. wraps horizontally rather than scrolling sideways like a terminal card; the
  5. list as a whole scrolls vertically within a capped height (see .sources). */
  6. .block {
  7. --dsl-web-radius: 12px;
  8. margin: 16px 0;
  9. padding: 12px 14px;
  10. color: var(--dsw-alias-label-primary);
  11. background: var(--dsw-alias-markdown-code-block);
  12. border-radius: var(--dsl-web-radius);
  13. }
  14. /* The provider answer reads as body prose above the citation list; its own
  15. MarkdownText margins are trimmed so the list sits tight under it. */
  16. .answer {
  17. margin-bottom: 8px;
  18. }
  19. .answer > :global(div) > :first-child {
  20. margin-top: 0;
  21. }
  22. .answer > :global(div) > :last-child {
  23. margin-bottom: 0;
  24. }
  25. /* The citation list: ordered so each source reads as a numbered reference. The
  26. whole list — the sources the tool returned, matching what the model saw —
  27. renders here; a max-height caps the card so a long list scrolls in place
  28. rather than growing the card unbounded. The height is a design constant of the
  29. card's geometry, not a deployment choice, so it lives here rather than a plugin
  30. config field.
  31. `overflow-y` makes this a scroll container, which also clips inline-start
  32. overflow: a marker wider than `padding-left` loses its leading digits with no
  33. way to scroll them back. Markers are right-aligned to the content edge, so the
  34. padding must fit the widest one the list can produce. `searchMaxResults` is an
  35. unbounded positive integer, so the padding is sized in `em` — against this
  36. element's own font, the one a marker inherits — to hold a three-digit marker
  37. (`999. ` measures 2.35em in the app font stack) plus the gap the one-digit
  38. case already had. */
  39. .sources {
  40. margin: 0;
  41. padding-left: 2.5em;
  42. display: flex;
  43. flex-direction: column;
  44. gap: 10px;
  45. max-height: 320px;
  46. overflow-y: auto;
  47. }
  48. .source {
  49. min-width: 0;
  50. }
  51. .sourceLink {
  52. color: var(--dsw-alias-state-business-primary);
  53. font-size: 14px;
  54. line-height: 20px;
  55. word-break: break-word;
  56. }
  57. .sourceLink:hover {
  58. text-decoration: underline;
  59. }
  60. .snippet {
  61. margin-top: 2px;
  62. color: var(--dsw-alias-label-secondary);
  63. font-size: 13px;
  64. line-height: 19px;
  65. word-break: break-word;
  66. }
  67. .published {
  68. margin-top: 2px;
  69. color: var(--dsw-alias-label-tertiary);
  70. font: var(--dsw-font-xs-13);
  71. }
  72. .truncated {
  73. margin-top: 8px;
  74. color: var(--dsw-alias-label-tertiary);
  75. font: var(--dsw-font-xs-13);
  76. }
  77. .empty {
  78. color: var(--dsw-alias-label-secondary);
  79. font: var(--dsw-font-xs-13);
  80. }
  81. /* The fetch card is a compact summary: the URL over a status/truncation row. */
  82. .fetch {
  83. display: flex;
  84. flex-direction: column;
  85. gap: 6px;
  86. }
  87. .fetchUrl {
  88. color: var(--dsw-alias-state-business-primary);
  89. font-family: var(--ds-font-family-code);
  90. font-size: 13px;
  91. line-height: 19px;
  92. word-break: break-all;
  93. }
  94. .fetchUrl:hover {
  95. text-decoration: underline;
  96. }
  97. .fetchMeta {
  98. display: flex;
  99. align-items: baseline;
  100. gap: 12px;
  101. }
  102. .status {
  103. color: var(--dsw-alias-label-secondary);
  104. font: var(--dsw-font-xs-13);
  105. }
  106. /* The fetch card's truncation note sits inline beside the status, so it drops
  107. the search card's top margin. */
  108. .fetch .truncated {
  109. margin-top: 0;
  110. }