Skip to content

Commit adccf53

Browse files
committed
fix duplicate css
1 parent 891ea3e commit adccf53

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

snippets/components/CodePreview.css

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,6 @@
152152
scroll-behavior: smooth;
153153
}
154154

155-
/* Ensure code formatting is preserved */
156-
.code-content pre {
157-
white-space: pre;
158-
word-wrap: normal;
159-
overflow-wrap: normal;
160-
}
161-
162-
.code-content pre code {
163-
display: block;
164-
white-space: pre;
165-
}
166-
167155
/* Custom scrollbar for code content */
168156
.code-content::-webkit-scrollbar {
169157
width: 8px;
@@ -191,6 +179,10 @@
191179
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
192180
font-size: 0.875rem;
193181
line-height: 1.6;
182+
white-space: pre;
183+
word-wrap: normal;
184+
overflow-wrap: normal;
185+
position: relative;
194186
}
195187

196188
.code-content pre code {
@@ -199,6 +191,8 @@
199191
color: inherit;
200192
font-size: inherit;
201193
border-radius: 0;
194+
display: block;
195+
white-space: pre;
202196
}
203197

204198
/* Code Line Wrapper */
@@ -255,17 +249,6 @@
255249
border-bottom-left-radius: 4px;
256250
}
257251

258-
/* Animation removed for simpler design */
259-
260-
/* Ensure code is properly positioned */
261-
.code-content pre {
262-
position: relative;
263-
}
264-
265-
.code-content pre code {
266-
display: block;
267-
}
268-
269252
/* Line numbers (optional) */
270253
.line-number {
271254
display: inline-block;

0 commit comments

Comments
 (0)