File size: 2,991 Bytes
4b59a79
 
6927c07
621b880
 
 
 
 
 
6927c07
 
4b59a79
6927c07
 
4b59a79
 
 
 
 
6927c07
 
 
621b880
4b59a79
 
621b880
 
4b59a79
621b880
6927c07
 
 
 
4b59a79
6927c07
 
 
 
 
4b59a79
6927c07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d364a6f
 
 
 
 
 
 
6927c07
 
 
4b59a79
6927c07
4b59a79
6927c07
 
 
 
 
 
 
 
4b59a79
621b880
 
4b59a79
 
 
 
621b880
6927c07
 
 
 
 
 
 
 
 
4b59a79
6927c07
 
621b880
6927c07
 
 
 
 
4b59a79
 
6927c07
 
 
621b880
 
4b59a79
 
621b880
6927c07
 
 
621b880
 
 
6927c07
 
 
621b880
 
 
6927c07
 
621b880
 
 
4b59a79
621b880
ab9d59a
621b880
4b59a79
621b880
 
ab9d59a
 
6927c07
 
 
 
 
 
 
 
 
4b59a79
6927c07
 
 
 
 
 
4b59a79
6927c07
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
$font-mono: ui-monospace, 'Fira Code', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
$code-font-size: 13px;

@mixin not-inside-actions {
  &:not(:has(:global(.actions)), :global(.actions *)) {
    @content;
  }
}

.MarkdownContent {
  line-height: 1.6;
  color: var(--bolt-elements-textPrimary);

  > *:not(:last-child) {
    margin-block-end: 16px;
  }

  :global(.artifact) {
    margin: 1.5em 0;
  }

  :is(h1, h2, h3, h4, h5, h6) {
    @include not-inside-actions {
      margin-block-start: 24px;
      margin-block-end: 16px;
      font-weight: 600;
      line-height: 1.25;
      color: var(--bolt-elements-textPrimary);
    }
  }

  h1 {
    font-size: 2em;
    border-bottom: 1px solid var(--bolt-elements-borderColor);
    padding-bottom: 0.3em;
  }

  h2 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--bolt-elements-borderColor);
    padding-bottom: 0.3em;
  }

  h3 {
    font-size: 1.25em;
  }

  h4 {
    font-size: 1em;
  }

  h5 {
    font-size: 0.875em;
  }

  h6 {
    font-size: 0.85em;
    color: #6a737d;
  }

  p {
    white-space: pre-wrap;

    &:not(:last-of-type) {
      margin-block-start: 0;
      margin-block-end: 16px;
    }
  }

  a {
    color: var(--bolt-elements-messages-linkColor);
    text-decoration: none;
    cursor: pointer;

    &:hover {
      text-decoration: underline;
    }
  }

  :not(pre) > code {
    font-family: $font-mono;
    font-size: $code-font-size;

    @include not-inside-actions {
      border-radius: 6px;
      padding: 0.2em 0.4em;
      background-color: var(--bolt-elements-messages-inlineCode-background);
      color: var(--bolt-elements-messages-inlineCode-text);
    }
  }

  pre {
    padding: 20px 16px;
    border-radius: 6px;
  }

  pre:has(> code) {
    font-family: $font-mono;
    font-size: $code-font-size;
    background: transparent;
    overflow-x: auto;
    min-width: 0;
  }

  blockquote {
    margin: 0;
    padding: 0 1em;
    color: var(--bolt-elements-textTertiary);
    border-left: 0.25em solid var(--bolt-elements-borderColor);
  }

  :is(ul, ol) {
    @include not-inside-actions {
      padding-left: 2em;
      margin-block-start: 0;
      margin-block-end: 16px;
    }
  }

  ul {
    @include not-inside-actions {
      list-style-type: disc;
    }
  }

  ol {
    @include not-inside-actions {
      list-style-type: decimal;
    }
  }

  li {
    @include not-inside-actions {
      & + li {
        margin-block-start: 8px;
      }

      > *:not(:last-child) {
        margin-block-end: 16px;
      }
    }
  }

  img {
    max-width: 100%;
    box-sizing: border-box;
  }

  hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: var(--bolt-elements-borderColor);
    border: 0;
  }

  table {
    border-collapse: collapse;
    width: 100%;
    margin-block-end: 16px;

    :is(th, td) {
      padding: 6px 13px;
      border: 1px solid #dfe2e5;
    }

    tr:nth-child(2n) {
      background-color: #f6f8fa;
    }
  }
}