WebBlock.module.css 3.3 KB

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