Skip to content

Commit 15413cf

Browse files
Revert "Code block cursor update (#9692)" (#9707)
This reverts commit 15e0d22.
1 parent 84e7243 commit 15413cf

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

sparkle/src/components/markdown/CodeBlock.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,12 @@ export function CodeBlock({
125125
style={codeStyle}
126126
language={languageToUse}
127127
PreTag="div"
128-
className="s-cursor-text"
129128
>
130129
{String(children).replace(/\n$/, "")}
131130
</SyntaxHighlighter>
132131
</Suspense>
133132
) : (
134-
<code className="s-mx-0.5 s-cursor-text s-rounded-lg s-border s-border-border-dark s-bg-muted s-px-1.5 s-py-1 s-text-amber-600">
133+
<code className="s-mx-0.5 s-rounded-lg s-border s-border-border-dark s-bg-muted s-px-1.5 s-py-1 s-text-amber-600">
135134
{children}
136135
</code>
137136
);

sparkle/src/components/markdown/CodeBlockWithExtendedSupport.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,7 @@ const mermaidStyles = `
104104
/* Base diagram styles */
105105
.mermaid {
106106
background: ${palette.slate[50]};
107-
cursor: default;
108107
}
109-
110-
.mermaid text,
111-
.mermaid .nodeLabel,
112-
.mermaid .edgeLabel,
113-
.mermaid .label {
114-
cursor: text;
115108
116109
/* Cluster styles */
117110
.mermaid .cluster rect {

sparkle/src/components/markdown/ContentBlockWrapper.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function ContentBlockWrapper({
101101
<div className="s-sticky s-top-0 s-z-[1] s-w-full">
102102
<div
103103
id="BlockActions"
104-
className="s-absolute s-right-2 s-top-2 s-z-50 s-flex s-gap-2"
104+
className="s-flex s-w-full s-justify-end s-gap-1 s-p-2"
105105
>
106106
{actions && actions}
107107
{getContentToDownload && (
@@ -124,7 +124,9 @@ export function ContentBlockWrapper({
124124
)}
125125
</div>
126126
</div>
127-
<div className={cn("s-z-0 s-w-full", innerClassName)}>{children}</div>
127+
<div className={cn("s-z-0 -s-mt-11 s-w-full", innerClassName)}>
128+
{children}
129+
</div>
128130
</div>
129131
);
130132
}

0 commit comments

Comments
 (0)