Skip to content

Commit a5be3f4

Browse files
authored
fix: Textarea CSS improvements for code blocks (#546)
1 parent ff552b7 commit a5be3f4

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/styles/messages.css

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,10 @@
10521052
border-radius: 10px;
10531053
background: var(--surface-command);
10541054
overflow: hidden;
1055-
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
1056-
margin: 6px 0;
1055+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
1056+
margin: 8px 0;
1057+
width: 100%;
1058+
max-width: 100%;
10571059
}
10581060

10591061
.message .markdown-codeblock-header {
@@ -1097,25 +1099,31 @@
10971099
padding: 10px 12px 12px;
10981100
white-space: pre;
10991101
overflow-x: auto;
1102+
width: 100%;
1103+
max-width: none;
1104+
box-sizing: border-box;
11001105
font-family: var(--code-font-family);
11011106
font-size: var(--code-font-size, 11px);
11021107
font-weight: var(--code-font-weight, 400);
11031108
line-height: var(--code-line-height, 1.28);
11041109
}
11051110

11061111
.message .markdown-codeblock-single {
1107-
margin: 6px 0;
1112+
margin: 8px 0;
11081113
padding: 10px 12px 12px;
11091114
border: 1px solid var(--border-stronger);
11101115
border-radius: 10px;
11111116
background: var(--surface-command);
11121117
white-space: pre;
11131118
overflow-x: auto;
1119+
width: 100%;
1120+
max-width: none;
1121+
box-sizing: border-box;
11141122
font-family: var(--code-font-family);
11151123
font-size: var(--code-font-size, 11px);
11161124
font-weight: var(--code-font-weight, 400);
11171125
line-height: var(--code-line-height, 1.28);
1118-
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
1126+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
11191127
}
11201128

11211129
.message .markdown-codeblock-single code {
@@ -1173,7 +1181,7 @@
11731181
margin: 0;
11741182
}
11751183

1176-
.message.assistant .markdown :where(p, ul, ol, pre, blockquote) {
1184+
.message.assistant .markdown :where(p, ul, ol, blockquote) {
11771185
max-width: 94ch;
11781186
}
11791187

0 commit comments

Comments
 (0)