Skip to content

Commit 723d907

Browse files
committed
refactor: resolve code review feedback for markdown typography (#365)
1 parent 57b9169 commit 723d907

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

src/assets/index.css

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,7 @@ textarea {
484484
line-height: 1.4;
485485
}
486486

487-
.chatbot-host-bubble.prose h4,
488-
.chatbot-host-bubble .prose h4,
489-
.chatbot-host-bubble.prose h5,
490-
.chatbot-host-bubble .prose h5,
491-
.chatbot-host-bubble.prose h6,
492-
.chatbot-host-bubble .prose h6 {
487+
:is(.chatbot-host-bubble.prose, .chatbot-host-bubble .prose) :is(h4, h5, h6) {
493488
font-size: 0.95em;
494489
font-weight: 600;
495490
margin-top: 0.3em;
@@ -546,13 +541,13 @@ textarea {
546541
margin-bottom: 0.3em;
547542
}
548543

549-
.chatbot-host-bubble.prose :first-child,
550-
.chatbot-host-bubble .prose :first-child {
544+
.chatbot-host-bubble.prose > :first-child,
545+
.chatbot-host-bubble .prose > :first-child {
551546
margin-top: 0;
552547
}
553548

554-
.chatbot-host-bubble.prose :last-child,
555-
.chatbot-host-bubble .prose :last-child {
549+
.chatbot-host-bubble.prose > :last-child,
550+
.chatbot-host-bubble .prose > :last-child {
556551
margin-bottom: 0;
557552
}
558553

src/components/bubbles/BotBubble.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const BotBubble = (props: Props) => {
345345
<span
346346
ref={setArtifactRef}
347347
innerHTML={Marked.parse(item.data as string)}
348-
class="prose"
348+
class="chatbot-host-bubble prose"
349349
style={{
350350
'background-color': props.backgroundColor ?? defaultBackgroundColor,
351351
color: props.textColor ?? defaultTextColor,

0 commit comments

Comments
 (0)