Skip to content

Commit 609dd0f

Browse files
profbobaprofbobaclaudemaria-rcks
authored
fix(web): plain text code blocks match the text around them (#27144)
Co-authored-by: profboba <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: maria-rcks <[email protected]>
1 parent 7ec1894 commit 609dd0f

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎apps/web/src/index.css‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,6 +2181,20 @@ code {
21812181
background: transparent !important;
21822182
}
21832183

2184+
/* Plain-text fences override the highlighter's inline foreground colors. */
2185+
:is(.chat-markdown, .composer-tiptap)
2186+
.chat-markdown-codeblock:is(
2187+
[data-language="text" i],
2188+
[data-language="txt" i],
2189+
[data-language="plain" i],
2190+
[data-language="plaintext" i]
2191+
) {
2192+
&,
2193+
& :is(pre, pre *) {
2194+
color: inherit !important;
2195+
}
2196+
}
2197+
21842198
/* Paragraphs and code blocks arrive in chunks while a response streams. Fade
21852199
each new block in so the chunk does not pop. @starting-style only applies
21862200
when an element is first inserted, and the rule is gated on data-streaming,

0 commit comments

Comments
 (0)