@@ -228,12 +228,123 @@ html {
228
228
font-size : 16px ;
229
229
}
230
230
231
- .code-viewer pre {
232
- font-size : inherit !important ;
231
+ /* === Base <code> styles === */
232
+ code {
233
+ font-weight : bold ;
234
+ font-size : 0.95em ;
235
+ border-radius : 0 ;
236
+ padding : 0.15em 0.35em ;
237
+ scrollbar-width : thin ;
238
+ scrollbar-color : rgb (99 , 99 , 99 ) rgb (41 , 45 , 62 );
239
+ }
240
+
241
+ /* Normalize inner span styles */
242
+ code span {
243
+ font-style : normal !important ;
244
+ }
245
+
246
+ /* === Theme-specific inline <code> backgrounds === */
247
+ html [data-theme = ' dark' ] pre ,
248
+ html [data-theme = ' dark' ] pre code ,
249
+ html [data-theme = ' dark' ] code {
250
+ background : none !important ;
251
+ background-color : #292D3E !important ;
252
+ box-shadow : none !important ;
253
+ filter : none !important ;
254
+ border : none !important ;
255
+ }
256
+
257
+ html [data-theme = ' light' ] code {
258
+ background-color : #f5f5f5 !important ;
259
+ color : #000 !important ;
260
+ }
261
+
262
+ /* === Block code (pre) === */
263
+ pre {
264
+ padding : 1rem ;
265
+ border-radius : 0 !important ;
266
+ }
267
+
268
+ html [data-theme = ' light' ] pre ,
269
+ html [data-theme = ' light' ] pre code {
270
+ background-color : #f5f5f5 !important ;
271
+ color : #000 !important ;
272
+ }
273
+
274
+ html [data-theme = ' dark' ] pre ,
275
+ html [data-theme = ' dark' ] pre code {
276
+ background-color : #292D3E !important ;
277
+ color : var (--prism-color );
278
+ }
279
+
280
+ /* === Prism token styles (Dark Theme) === */
281
+ code .token.keyword {
282
+ font-style : italic !important ;
283
+ color : rgb (86 , 156 , 214 ) !important ;
284
+ }
285
+
286
+ code .token.plain {
287
+ color : rgb (156 , 220 , 254 ) !important ;
288
+ }
289
+
290
+ code .token.punctuation {
291
+ color : rgb (199 , 146 , 234 ) !important ;
292
+ }
293
+
294
+ code .token.operator {
295
+ color : rgb (137 , 221 , 255 ) !important ;
296
+ }
297
+
298
+ code .token.string {
299
+ color : rgb (206 , 145 , 120 ) !important ;
300
+ }
301
+
302
+ code .token.number {
303
+ color : rgb (181 , 206 , 168 ) !important ;
304
+ }
305
+
306
+ code .token.function {
307
+ color : rgb (220 , 220 , 170 ) !important ;
308
+ }
309
+
310
+ /* === Prism token styles (Light Theme) === */
311
+ html [data-theme = ' light' ] code .token.keyword {
312
+ font-style : italic !important ;
313
+ color : rgb (0 , 92 , 154 ) !important ;
314
+ }
315
+
316
+ html [data-theme = ' light' ] code .token.plain {
317
+ color : rgb (36 , 41 , 46 ) !important ;
318
+ }
319
+
320
+ html [data-theme = ' light' ] code .token.identifier {
321
+ color : rgb (0 , 102 , 204 ) !important ;
322
+ }
323
+
324
+ html [data-theme = ' light' ] code .token.punctuation {
325
+ color : rgb (125 , 86 , 148 ) !important ;
326
+ }
327
+
328
+ html [data-theme = ' light' ] code .token.operator {
329
+ color : rgb (0 , 112 , 138 ) !important ;
330
+ }
331
+
332
+ html [data-theme = ' light' ] code .token.string {
333
+ color : rgb (163 , 21 , 21 ) !important ;
334
+ }
335
+
336
+ html [data-theme = ' light' ] code .token.number {
337
+ color : rgb (34 , 134 , 58 ) !important ;
338
+ }
339
+
340
+ html [data-theme = ' light' ] code .token.function {
341
+ color : rgb (88 , 92 , 63 ) !important ;
233
342
}
234
343
235
- .code-viewer pre code {
236
- font-size : inherit !important ;
344
+ /* Ensure keywords are not italic if nested */
345
+ html [data-theme = ' light' ] code span .token.keyword ,
346
+ code span .token.keyword {
347
+ font-style : normal !important ;
237
348
}
238
349
239
350
.markdown h1 :first-child {
0 commit comments