content-bash.module.css 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .root {
  2. width: 100%;
  3. max-width: var(--sm-tool-width);
  4. display: flex;
  5. flex-direction: column;
  6. align-items: flex-start;
  7. gap: 0.5rem;
  8. [data-slot="expand-button"] {
  9. flex: 0 0 auto;
  10. padding: 2px 0;
  11. font-size: 0.75rem;
  12. }
  13. [data-slot="body"] {
  14. display: flex;
  15. flex-direction: column;
  16. border: 1px solid var(--sl-color-divider);
  17. border-radius: 0.25rem;
  18. overflow: hidden;
  19. width: 100%;
  20. }
  21. [data-slot="header"] {
  22. position: relative;
  23. border-bottom: 1px solid var(--sl-color-divider);
  24. width: 100%;
  25. height: 1.625rem;
  26. text-align: center;
  27. padding: 0 3.25rem;
  28. > span {
  29. max-width: min(100%, 140ch);
  30. display: inline-block;
  31. white-space: nowrap;
  32. overflow: hidden;
  33. line-height: 1.625rem;
  34. font-size: 0.75rem;
  35. text-overflow: ellipsis;
  36. color: var(--sl-color-text-dimmed);
  37. }
  38. &::before {
  39. content: "";
  40. position: absolute;
  41. pointer-events: none;
  42. top: 8px;
  43. left: 10px;
  44. width: 2rem;
  45. height: 0.5rem;
  46. line-height: 0;
  47. background-color: var(--sl-color-hairline);
  48. mask-image: var(--term-icon);
  49. mask-repeat: no-repeat;
  50. }
  51. }
  52. [data-slot="content"] {
  53. display: flex;
  54. flex-direction: column;
  55. padding: 0.5rem calc(0.5rem + 3px);
  56. pre {
  57. --shiki-dark-bg: var(--sl-color-bg) !important;
  58. background-color: var(--sl-color-bg) !important;
  59. line-height: 1.6;
  60. font-size: 0.75rem;
  61. white-space: pre-wrap;
  62. word-break: break-word;
  63. margin: 0;
  64. span {
  65. white-space: break-spaces;
  66. }
  67. }
  68. }
  69. [data-slot="output"] {
  70. display: -webkit-box;
  71. -webkit-box-orient: vertical;
  72. -webkit-line-clamp: 10;
  73. line-clamp: 10;
  74. overflow: hidden;
  75. }
  76. &[data-expanded] [data-slot="output"] {
  77. display: block;
  78. -webkit-line-clamp: none;
  79. line-clamp: none;
  80. overflow: visible;
  81. }
  82. }